-
-
Notifications
You must be signed in to change notification settings - Fork 243
51 lines (44 loc) · 1.32 KB
/
manual-publish.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
name: manual-publish
on:
workflow_dispatch:
inputs:
ref_to_publish:
description: 'Ref (branch or tag)'
required: true
default: 'refs/heads/series/4.x'
stable_version:
description: 'Stable version? (true=staging, false=snapshot)'
required: true
default: "true"
jobs:
publish:
name: Publish to Sonatype (Request)
env:
CI: true
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 100
ref: ${{ github.event.inputs.ref_to_publish }}
- uses: actions/setup-java@v3
with:
java-version: 8
distribution: adopt
- name: Install GnuPG2
run: |
./.github/scripts/setup-pgp
- name: sbt ci-release
run: |
git fetch --depth=100 origin +refs/tags/*:refs/tags/*
if [ "$PUBLISH_STABLE_VERSION" = "true" ]; then
sbt ci-release
else
sbt +clean +publishSigned
fi
env:
PGP_KEY_HEX: ${{ secrets.PGP_KEY_HEX }}
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
PUBLISH_STABLE_VERSION: ${{ github.event.inputs.stable_version }}