-
Notifications
You must be signed in to change notification settings - Fork 32
33 lines (31 loc) · 1.05 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
name: Publish package to the Maven Central Repository
on:
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Maven Central Repository
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
architecture: x64
cache: maven
server-id: ossrh
server-username: CI_DEPLOY_USERNAME
server-password: CI_DEPLOY_PASSWORD
gpg-private-key: ${{ secrets.RUNE_GPG_PRIVATE_KEY }}
gpg-passphrase: GPG_PASSPHRASE
- name: Set version
shell: bash
run: mvn -B versions:set -DnewVersion=${{ github.event.release.tag_name }}
- name: Publish package
run: mvn -B -U clean deploy -P release
env:
GPG_KEYNAME: ${{ secrets.RUNE_GPG_KEYNAME }}
GPG_PASSPHRASE: ${{ secrets.RUNE_GPG_PASSPHRASE }}
CI_DEPLOY_USERNAME: ${{ secrets.CI_DEPLOY_USERNAME }}
CI_DEPLOY_PASSWORD: ${{ secrets.CI_DEPLOY_PASSWORD }}