-
Notifications
You must be signed in to change notification settings - Fork 227
103 lines (96 loc) · 3.34 KB
/
pack-upload.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: Pack and Upload
on:
workflow_dispatch:
workflow_call:
jobs:
pack_deb:
# ubuntu started using a compression method after this version that debian currently does not support
# https://github.com/heroku/cli/pull/2245#issue-1590017122
runs-on: ubuntu-20.04
env:
HEROKU_AUTHOR: 'Heroku'
steps:
- uses: actions/checkout@v4
- name: Install system deps
run: |
sudo apt-get update
sudo apt-get install -y nsis p7zip-full
- run: sudo mkdir -p /build
- name: Install package deps
run: yarn --immutable --network-timeout 1000000
- name: Building deb
run: yarn oclif pack:deb --root="./packages/cli"
- uses: actions/upload-artifact@v4
with:
name: packed-deb
path: /home/runner/work/cli/cli/packages/cli/dist
pack_tarballs:
runs-on: pub-hk-ubuntu-22.04-2xlarge
steps:
- uses: actions/checkout@v4
- name: Install system deps
run: |
sudo apt-get update
sudo apt-get install -y nsis p7zip-full
- run: sudo mkdir -p /build
- name: Install package deps
run: yarn --immutable --network-timeout 1000000
- name: Building tarballs
run: yarn oclif pack tarballs --root="./packages/cli"
- uses: actions/upload-artifact@v4
with:
name: packed-tarballs
path: /home/runner/work/cli/cli/packages/cli/dist
sign_deb:
needs: [pack_deb]
runs-on: ubuntu-latest
environment: SignDebian
env:
HEROKU_DEB_SECRET_KEY: ${{ secrets.HEROKU_DEB_SECRET_KEY }}
HEROKU_DEB_SIGNING_PASSWORD: ${{ secrets.HEROKU_DEB_SIGNING_PASSWORD }}
HEROKU_DEB_KEY_ID: ${{ secrets.HEROKU_DEB_KEY_ID }}
HEROKU_DEB_PUBLIC_KEY: ${{ secrets.HEROKU_DEB_PUBLIC_KEY }}
steps:
- uses: actions/checkout@v4
- run: sudo mkdir -p /build
- uses: actions/download-artifact@v4
with:
name: packed-deb
path: /home/runner/work/cli/cli/packages/cli/dist
- run: |
cd /home/runner/work/cli/cli/packages/cli/dist/deb
/home/runner/work/cli/cli/packages/cli/scripts/sign/deb
- uses: actions/upload-artifact@v4
with:
name: signed-deb
path: /home/runner/work/cli/cli/packages/cli/dist
upload-deb-and-tarballs:
needs: [sign_deb, pack_tarballs]
runs-on: ubuntu-latest
env:
CLOUDFRONT_DISTRIBUTION: ${{ secrets.CLOUDFRONT_DISTRIBUTION }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_EC2_METADATA_DISABLED: true
steps:
- uses: actions/checkout@v4
- run: sudo mkdir -p /build
- uses: actions/download-artifact@v4
with:
name: signed-deb
path: /home/runner/work/cli/cli/packages/cli/dist
- uses: actions/download-artifact@v4
with:
name: packed-tarballs
path: /home/runner/work/cli/cli/packages/cli/dist
- name: List all the downloaded files (for debugging)
run: ls -R
working-directory: /home/runner/work/cli/cli/packages/cli/dist
- name: yarn install
run: yarn --immutable --network-timeout 1000000
- name: Upload production artifacts
run: |
cd packages/cli
pwd
yarn oclif upload tarballs
./scripts/upload/deb