Skip to content

Commit 1ae4c44

Browse files
authored
Release flow for the 6.1.x branch (#3038)
1 parent 5b1b259 commit 1ae4c44

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
types: [published] # once a release is published in the GitHub UI
6+
workflow_dispatch: # or manually, by clicking the button
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout sources
14+
uses: actions/checkout@v4
15+
16+
- name: Set up Java with Maven cache
17+
18+
uses: actions/setup-java@v4
19+
with:
20+
java-version: '8'
21+
distribution: 'temurin'
22+
cache: 'maven'
23+
server-id: ossrh
24+
server-username: MAVEN_USERNAME
25+
server-password: MAVEN_PASSWORD
26+
27+
- name: Update version in Maven configuration
28+
run: |
29+
mvn --no-transfer-progress \
30+
--batch-mode \
31+
versions:set -DnewVersion=${{ github.event.release.tag_name }}
32+
if: ${{ github.event.release.tag_name }}
33+
34+
- name: Install GPG key
35+
36+
run: |
37+
cat <(echo -e "${{ secrets.OSSH_GPG_SECRET_KEY }}") | gpg --batch --import
38+
gpg --list-secret-keys --keyid-format LONG
39+
40+
- name: Publish to Maven
41+
42+
run: |
43+
mvn --no-transfer-progress \
44+
--batch-mode \
45+
-Dgpg.passphrase='${{ secrets.OSSH_GPG_SECRET_KEY_PASSWORD }}' \
46+
deploy -P sonatype-oss-release
47+
48+
env:
49+
MAVEN_USERNAME: ${{secrets.OSSH_USERNAME}}
50+
MAVEN_PASSWORD: ${{secrets.OSSH_TOKEN}}

0 commit comments

Comments
 (0)