@@ -21,26 +21,26 @@ jobs:
21
21
runs-on : macOS-latest
22
22
env :
23
23
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 }}
27
24
steps :
28
25
- name : Checkout
29
26
uses : actions/checkout@v5
30
27
with :
31
28
# Allow goreleaser to access older tag information.
32
29
fetch-depth : 0
30
+
33
31
- name : Install go
34
32
uses : actions/setup-go@v5
35
33
with :
36
34
go-version-file : " go.mod"
37
35
cache : true
36
+
38
37
- name : Import GPG key
39
38
uses : crazy-max/ghaction-import-gpg@v6
40
39
id : import_gpg
41
40
with :
42
41
gpg_private_key : ${{ secrets.GPG_PRIVATE_KEY }}
43
42
passphrase : ${{ secrets.GPG_PASSPHRASE }}
43
+
44
44
- name : Set up keychain
45
45
run : |
46
46
echo -n $SIGNING_CERTIFICATE_BASE64 | base64 -d -o ./ApplicationID.p12
@@ -61,17 +61,54 @@ jobs:
61
61
APPLE_KEY_ID : ${{ secrets.APPLE_KEY_ID }}
62
62
SIGNING_CERTIFICATE_BASE64 : ${{ secrets.APPLICATION_ID_CERT }}
63
63
AUTHKEY_BASE64 : ${{ secrets.APPLE_API_KEY }}
64
- - name : Install Aptly
65
- run : brew install aptly
66
64
- name : Install Snapcraft
67
65
uses : samuelmeuli/action-snapcraft@v3
66
+
68
67
- name : Run GoReleaser
69
68
uses : goreleaser/goreleaser-action@v6
70
69
with :
71
70
args : release --clean
72
71
env :
73
72
GITHUB_TOKEN : ${{ secrets.CLI_RELEASE }}
74
73
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
+
75
112
- name : Publish packages to APT repo
76
113
if : contains(github.ref_name, '-') == false
77
114
env :
0 commit comments