-
Notifications
You must be signed in to change notification settings - Fork 5
87 lines (76 loc) · 2.69 KB
/
release.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: Release
on:
workflow_dispatch: {}
env:
SIGNING_KEY_FILE_PATH: /home/runner/secretKey.gpg
jobs:
lint:
uses: ./.github/workflows/lint.yml
test:
uses: ./.github/workflows/test.yml
build:
uses: ./.github/workflows/build.yml
secrets:
SIGNING_KEY_FILE: ${{ secrets.SIGNING_KEY_FILE }}
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
# release:
# name: Release
# needs: [lint, test, build]
# runs-on: ubuntu-latest
# permissions:
# contents: write
# issues: write
# pull-requests: write
# steps:
# - name: Checkout repo
# uses: actions/checkout@v3
# with:
# # pulls all commits (needed for semantic release to correctly version)
# fetch-depth: '0'
# persist-credentials: false
# - name: Set up JDK 17
# uses: actions/setup-java@v3
# with:
# java-version: '17'
# distribution: 'temurin'
# cache: gradle
# - name: Install Dependencies
# run: |
# npm i -g @semantic-release/exec @semantic-release/changelog @semantic-release/git [email protected]
# # - name: GitHub Release
# # env:
# # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# # run: npx semantic-release@21
# - name: Publish to Maven
# run: echo "Publish to Maven"
# after build and unit tests are finished, publish all modules at once
# to help reduce the probability of failure when interacting with sonatype servers
publish_all_modules:
needs: [lint, test, build]
name: Publish All Modules To Sonatype
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up Java 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'microsoft'
- name: Decode Signing Key
uses: ./.github/actions/decode_signing_key_action
with:
signing_key_file: ${{ secrets.SIGNING_KEY_FILE }}
signing_file_path: ${{ env.SIGNING_KEY_FILE_PATH }}
# - name: Update Version
# run: |
# ./gradlew -PversionParam=${{ github.event.inputs.version }} changeReleaseVersion
- name: Publish All Modules
uses: ./.github/actions/publish_all_modules
with:
sonatype_usr: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
sonatype_pwd: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
signing_key_id: ${{ secrets.SIGNING_KEY_ID }}
signing_key_pwd: ${{ secrets.SIGNING_KEY_PASSWORD }}
signing_key_file: ${{ env.SIGNING_KEY_FILE_PATH }}