-
Notifications
You must be signed in to change notification settings - Fork 3
63 lines (56 loc) · 1.58 KB
/
sdk_publish.yaml
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
52
53
54
55
56
57
58
59
60
61
62
63
name: Publish
permissions:
checks: write
contents: write
pull-requests: write
statuses: write
id-token: write
on:
push:
branches:
- main
paths:
- .speakeasy/gen.lock
workflow_dispatch: {}
jobs:
publish:
runs-on: ubuntu-latest
env:
JRELEASER_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
SIGNINGPASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
JRELEASER_GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }}
SIGNINGKEY: ${{ secrets.GPG_SECRET_KEY }}
JRELEASER_DEPLOY_MAVEN_MAVENCENTRAL_PASSWORD: ${{ secrets.MAVENCENTRAL_PASSWORD }}
JRELEASER_DEPLOY_MAVEN_MAVENCENTRAL_USERNAME: ${{ secrets.MAVENCENTRAL_USERNAME }}
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '11'
cache: 'gradle'
- name: Verify Config
run: |
./gradlew jreleaserConfig
- name: Clean & Build Project
run: |
./gradlew clean build --no-daemon
- name: Stage Artifact
run: |
./gradlew publish --no-daemon
- name: Dry Run
run: |
./gradlew jreleaserFullRelease --dry-run
- name: Full Release
run: |
./gradlew jreleaserFullRelease --no-daemon --debug
- name: Check Status
run: |
STATUS=$?
if [ $STATUS -ne 0 ]; then
echo "Error occurred during publishing"
exit $STATUS
fi