Skip to content

Commit 4701402

Browse files
committed
Add a deploy script.
1 parent 1f5b366 commit 4701402

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# GH_TOKEN
2+
# NEXUS_USER
3+
# NEXUS_PASS64 (base64 NOTE: `base64` and `openssl base64` failed, had to use Java
4+
# byte[] data = "{{password}}".getBytes(StandardCharsets.UTF_8);
5+
# String encoded = new String(Base64.getEncoder().encode(data), StandardCharsets.UTF_8);
6+
# System.out.println(encoded);
7+
# GPG_PASSPHRASE
8+
# GPG_KEY64 (base64)
9+
# gpg --export-secret-keys --armor KEY_ID | openssl base64 | pbcopy
10+
11+
name: deploy
12+
on:
13+
workflow_dispatch:
14+
inputs:
15+
to_publish:
16+
description: 'What to publish'
17+
required: true
18+
default: 'all'
19+
type: choice
20+
options:
21+
- all
22+
23+
jobs:
24+
build:
25+
runs-on: ubuntu-latest
26+
name: deploy
27+
env:
28+
gh_token: ${{ secrets.GH_TOKEN }}
29+
ORG_GRADLE_PROJECT_nexus_user: ${{ secrets.NEXUS_USER }}
30+
ORG_GRADLE_PROJECT_nexus_pass64: ${{ secrets.NEXUS_PASS64 }}
31+
ORG_GRADLE_PROJECT_gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }}
32+
ORG_GRADLE_PROJECT_gpg_key64: ${{ secrets.GPG_KEY64 }}
33+
steps:
34+
- uses: actions/checkout@v3
35+
- name: jdk 11
36+
uses: actions/setup-java@v3
37+
with:
38+
java-version: 11
39+
distribution: 'temurin'
40+
- name: gradle caching
41+
uses: gradle/gradle-build-action@v2
42+
with:
43+
gradle-home-cache-cleanup: true
44+
- name: git fetch origin main
45+
run: git fetch origin main
46+
- name: publish all
47+
if: "${{ github.event.inputs.to_publish == 'all' }}"
48+
run: |
49+
./gradlew :changelogPush -Prelease=true -Penable_publishing=true --stacktrace --warning-mode all

0 commit comments

Comments
 (0)