@@ -17,13 +17,12 @@ permissions:
17
17
18
18
jobs :
19
19
goreleaser :
20
- name : Release
20
+ name : Build and Release
21
21
runs-on : macOS-latest
22
+ outputs :
23
+ gpg_fingerprint : ${{ steps.import_gpg.outputs.fingerprint }}
22
24
env :
23
25
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
26
steps :
28
27
- name : Checkout
29
28
uses : actions/checkout@v4
61
60
APPLE_KEY_ID : ${{ secrets.APPLE_KEY_ID }}
62
61
SIGNING_CERTIFICATE_BASE64 : ${{ secrets.APPLICATION_ID_CERT }}
63
62
AUTHKEY_BASE64 : ${{ secrets.APPLE_API_KEY }}
64
- # aptly version 1.6.0 results in an segmentation fault. Therefore we fall back to version 1.5.0.
65
- # Since it is not possible to specify a version via brew command a formula was added for aptly 1.5.0
66
- # (source: https://github.com/Homebrew/homebrew-core/pull/202415/files)
67
- - name : Install Aptly version 1.5.0
68
- run : brew install aptly.rb
69
63
- name : Install Snapcraft
70
64
uses : samuelmeuli/action-snapcraft@v3
71
65
- name : Run GoReleaser
@@ -75,26 +69,60 @@ jobs:
75
69
env :
76
70
GITHUB_TOKEN : ${{ secrets.CLI_RELEASE }}
77
71
GPG_FINGERPRINT : ${{ steps.import_gpg.outputs.fingerprint }}
78
- - name : Setup Docker with Colima
72
+ - name : Upload dist artifacts
73
+ uses : actions/upload-artifact@v4
74
+ with :
75
+ name : dist
76
+ path : dist/
77
+ retention-days : 1
78
+
79
+ publish-packages :
80
+ name : Publish Packages
81
+ runs-on : ubuntu-latest
82
+ needs : goreleaser
83
+ if : contains(github.ref_name, '-') == false
84
+ env :
85
+ AWS_ACCESS_KEY_ID : ${{ secrets.OBJECT_STORAGE_ACCESS_KEY_ID }}
86
+ AWS_SECRET_ACCESS_KEY : ${{ secrets.OBJECT_STORAGE_SECRET_ACCESS_KEY }}
87
+ GPG_PASSPHRASE : ${{ secrets.GPG_PASSPHRASE }}
88
+ GPG_PRIVATE_KEY_FINGERPRINT : ${{ needs.goreleaser.outputs.gpg_fingerprint }}
89
+ steps :
90
+ - name : Checkout
91
+ uses : actions/checkout@v4
92
+ with :
93
+ fetch-depth : 0
94
+ - name : Import GPG key
95
+ uses : crazy-max/ghaction-import-gpg@v6
96
+ id : import_gpg
97
+ with :
98
+ gpg_private_key : ${{ secrets.GPG_PRIVATE_KEY }}
99
+ passphrase : ${{ secrets.GPG_PASSPHRASE }}
100
+ # aptly version 1.6.0 results in an segmentation fault. Therefore we fall back to version 1.5.0.
101
+ # Since it is not possible to specify a version via brew command a formula was added for aptly 1.5.0
102
+ # (source: https://github.com/Homebrew/homebrew-core/pull/202415/files)
103
+ - name : Install Aptly version 1.5.0
104
+ run : |
105
+ # Install aptly on Ubuntu
106
+ wget -O - https://www.aptly.info/pubkey.txt | apt-key add -
107
+ echo "deb https://repo.aptly.info/ squeeze main" | tee -a /etc/apt/sources.list.d/aptly.list
108
+ apt-get update
109
+ apt-get install -y aptly
110
+ - name : Install createrepo_c
79
111
run : |
80
- # Install Docker CLI
81
- brew install docker
82
- # Install Colima
83
- brew install colima
84
- # Start Colima
85
- colima start --cpu 2 --memory 4 --disk 20
86
- # Verify Docker is working
87
- docker --version
88
- docker info
89
- echo "Docker is ready!"
112
+ # Install createrepo_c on Ubuntu
113
+ sudo apt-get update
114
+ sudo apt-get install -y createrepo-c
115
+ - name : Download dist artifacts
116
+ uses : actions/download-artifact@v4
117
+ with :
118
+ name : dist
119
+ path : dist/
90
120
- name : Publish packages to APT repo
91
- if : contains(github.ref_name, '-') == false
92
121
env :
93
122
GPG_PASSPHRASE : ${{ secrets.GPG_PASSPHRASE }}
94
123
GPG_PRIVATE_KEY_FINGERPRINT : ${{ steps.import_gpg.outputs.fingerprint }}
95
124
run : ./scripts/publish-apt-packages.sh
96
125
- name : Publish packages to RPM repo
97
- if : contains(github.ref_name, '-') == false
98
126
env :
99
127
GPG_PASSPHRASE : ${{ secrets.GPG_PASSPHRASE }}
100
128
GPG_PRIVATE_KEY_FINGERPRINT : ${{ steps.import_gpg.outputs.fingerprint }}
0 commit comments