Skip to content

Commit

Permalink
Create release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
KastenKlicker authored Oct 12, 2024
1 parent 5d26f9c commit 3043d1b
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: deploy-to-maven-central
on:
workflow_dispatch
jobs:
release:
name: Release
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Java 21
uses: actions/setup-java@v4 # Does also set up Maven and GPG
with:
distribution: 'temurin'
java-package: 'jdk'
java-version: '21'
check-latest: true
server-id: 'central' # must match the serverId configured for the nexus-staging-maven-plugin
server-username: CENTRAL_USERNAME # Env var that holds your central user name
server-password: CENTRAL_TOKEN # Env var that holds your central user token
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} # Substituted with the value stored in the referenced secret
gpg-passphrase: SIGN_KEY_PASS # Env var that holds the key's passphrase
cache: 'maven'
- name: Build & Deploy
run: |
# -U force updates just to make sure we are using latest dependencies
# -B Batch mode (do not ask for user input), just in case
# -P activate profile
mvn -U -B clean deploy -P release
env:
SIGN_KEY_PASS: ${{ secrets.GPG_KEY_PASSPHRASE }}
CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }}
CENTRAL_TOKEN: ${{ secrets.CENTRAL_TOKEN }}

0 comments on commit 3043d1b

Please sign in to comment.