@@ -21,26 +21,26 @@ jobs:
2121 runs-on : macOS-latest
2222 env :
2323 SNAPCRAFT_STORE_CREDENTIALS : ${{ secrets.SNAPCRAFT_TOKEN }}
24- # Needed to publish new packages to our S3-hosted APT repo
25- AWS_ACCESS_KEY_ID : ${{ secrets.OBJECT_STORAGE_ACCESS_KEY_ID }}
26- AWS_SECRET_ACCESS_KEY : ${{ secrets.OBJECT_STORAGE_SECRET_ACCESS_KEY }}
2724 steps :
2825 - name : Checkout
2926 uses : actions/checkout@v5
3027 with :
3128 # Allow goreleaser to access older tag information.
3229 fetch-depth : 0
30+
3331 - name : Install go
3432 uses : actions/setup-go@v5
3533 with :
3634 go-version-file : " go.mod"
3735 cache : true
36+
3837 - name : Import GPG key
3938 uses : crazy-max/ghaction-import-gpg@v6
4039 id : import_gpg
4140 with :
4241 gpg_private_key : ${{ secrets.GPG_PRIVATE_KEY }}
4342 passphrase : ${{ secrets.GPG_PASSPHRASE }}
43+
4444 - name : Set up keychain
4545 run : |
4646 echo -n $SIGNING_CERTIFICATE_BASE64 | base64 -d -o ./ApplicationID.p12
@@ -61,17 +61,54 @@ jobs:
6161 APPLE_KEY_ID : ${{ secrets.APPLE_KEY_ID }}
6262 SIGNING_CERTIFICATE_BASE64 : ${{ secrets.APPLICATION_ID_CERT }}
6363 AUTHKEY_BASE64 : ${{ secrets.APPLE_API_KEY }}
64- - name : Install Aptly
65- run : brew install aptly
6664 - name : Install Snapcraft
6765 uses : samuelmeuli/action-snapcraft@v3
66+
6867 - name : Run GoReleaser
6968 uses : goreleaser/goreleaser-action@v6
7069 with :
7170 args : release --clean
7271 env :
7372 GITHUB_TOKEN : ${{ secrets.CLI_RELEASE }}
7473 GPG_FINGERPRINT : ${{ steps.import_gpg.outputs.fingerprint }}
74+
75+ # artifacts need to be passed to the "publish-apt" job somehow
76+ - name : Upload artifacts to workflow
77+ uses : actions/upload-artifact@v4
78+ with :
79+ name : goreleaser-dist-temp
80+ path : dist
81+ retention-days : 1
82+
83+ publish-apt :
84+ name : Publish APT
85+ runs-on : ubuntu-latest
86+ needs : [goreleaser]
87+ env :
88+ # Needed to publish new packages to our S3-hosted APT repo
89+ AWS_ACCESS_KEY_ID : ${{ secrets.OBJECT_STORAGE_ACCESS_KEY_ID }}
90+ AWS_SECRET_ACCESS_KEY : ${{ secrets.OBJECT_STORAGE_SECRET_ACCESS_KEY }}
91+ steps :
92+ - name : Checkout
93+ uses : actions/checkout@v5
94+
95+ # use the artifacts from the "goreleaser" job
96+ - name : Download artifacts from workflow
97+ uses : actions/download-artifact@v4
98+ with :
99+ name : goreleaser-dist-temp
100+ path : dist
101+
102+ - name : Install Aptly
103+ run : brew install aptly
104+
105+ - name : Import GPG key
106+ uses : crazy-max/ghaction-import-gpg@v6
107+ id : import_gpg
108+ with :
109+ gpg_private_key : ${{ secrets.GPG_PRIVATE_KEY }}
110+ passphrase : ${{ secrets.GPG_PASSPHRASE }}
111+
75112 - name : Publish packages to APT repo
76113 if : contains(github.ref_name, '-') == false
77114 env :
0 commit comments