Skip to content

Commit 23571f7

Browse files
Add publish job
1 parent b91b61b commit 23571f7

File tree

2 files changed

+25
-2
lines changed

2 files changed

+25
-2
lines changed

.github/scripts/gpg-setup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# from https://github.com/coursier/apps/blob/f1d2bf568bf466a98569a85c3f23c5f3a8eb5360/.github/scripts/gpg-setup.sh
44

5-
echo $PGP_SECRET | base64 --decode | gpg --import --no-tty --batch --yes
5+
echo "$PGP_SECRET" | base64 --decode | gpg --import --no-tty --batch --yes
66

77
echo "allow-loopback-pinentry" >>~/.gnupg/gpg-agent.conf
88
echo "pinentry-mode loopback" >>~/.gnupg/gpg.conf

.github/workflows/ci.yml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,29 @@ jobs:
207207
if-no-files-found: warn
208208
retention-days: 2
209209

210+
publish:
211+
needs: [jvm-tests, format, checks, reference-doc]
212+
if: github.event_name == 'push'
213+
runs-on: ubuntu-latest
214+
steps:
215+
- uses: actions/checkout@v2
216+
with:
217+
fetch-depth: 0
218+
submodules: true
219+
- uses: coursier/[email protected]
220+
- uses: coursier/[email protected]
221+
with:
222+
jvm: 8
223+
- name: GPG setup
224+
run: .github/scripts/gpg-setup.sh
225+
env:
226+
PGP_SECRET: ${{ secrets.PGP_SECRET }}
227+
- run: ./mill -i publishSonatype __.publishArtifacts
228+
env:
229+
PGP_PASSWORD: ${{ secrets.PGP_PASSPHRASE }}
230+
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
231+
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
232+
210233
launchers:
211234
needs: [jvm-tests, native-tests, native-mostly-static-tests, native-static-tests, vc-redist, format, checks, reference-doc]
212235
if: github.event_name == 'push'
@@ -267,7 +290,7 @@ jobs:
267290
GPG_EMAIL: ${{ secrets.GPG_EMAIL }}
268291

269292
website:
270-
needs: update-packages
293+
needs: [publish, update-packages]
271294
if: github.event_name == 'push'
272295
runs-on: ubuntu-latest
273296
steps:

0 commit comments

Comments
 (0)