-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
885bba3
commit af8c4c1
Showing
2 changed files
with
79 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Publish Snapshot | ||
on: | ||
push: | ||
branches: | ||
- master | ||
workflow_dispatch: | ||
|
||
jobs: | ||
snapshot: | ||
name: Deploy Snapshot | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up publishing to maven central | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '8' | ||
distribution: 'temurin' | ||
cache: 'maven' | ||
server-id: ossrh | ||
server-username: MAVEN_USERNAME | ||
server-password: MAVEN_PASSWORD | ||
- name: mvn offline | ||
run: | | ||
mvn -q dependency:go-offline | ||
- name: deploy | ||
run: | | ||
mvn --no-transfer-progress -DskipTests deploy | ||
env: | ||
MAVEN_USERNAME: ${{secrets.OSSRH_USER}} | ||
MAVEN_PASSWORD: ${{secrets.OSSRH_PASSWORD}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Release | ||
on: | ||
release: | ||
types: [published] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Java with Maven cache | ||
|
||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '8' | ||
distribution: 'temurin' | ||
cache: 'maven' | ||
server-id: ossrh | ||
server-username: MAVEN_USERNAME | ||
server-password: MAVEN_PASSWORD | ||
|
||
- name: Update version in Maven configuration | ||
run: | | ||
mvn --no-transfer-progress \ | ||
--batch-mode \ | ||
versions:set -DnewVersion=${{ github.event.release.tag_name }} | ||
if: ${{ github.event.release.tag_name }} | ||
|
||
- name: Install GPG key | ||
|
||
run: | | ||
cat <(echo -e "${{ secrets.OSSH_GPG_SECRET_KEY }}") | gpg --batch --import | ||
gpg --list-secret-keys --keyid-format LONG | ||
- name: Publish to Maven | ||
|
||
run: | | ||
mvn --no-transfer-progress \ | ||
--batch-mode \ | ||
-Dgpg.passphrase='${{ secrets.OSSH_GPG_SECRET_KEY_PASSWORD }}' \ | ||
-DskipTests deploy | ||
env: | ||
MAVEN_USERNAME: ${{secrets.OSSRH_USER}} | ||
MAVEN_PASSWORD: ${{secrets.OSSRH_PASSWORD}} |