-
Notifications
You must be signed in to change notification settings - Fork 5
50 lines (45 loc) · 1.5 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
name: Release
on:
workflow_dispatch:
inputs:
nextVersion:
description: 'Next development version without "SNAPSHOT". If not provided, the next version will be calculated from the pom'
required: false
type: string
jobs:
pre-release:
uses: gluonhq/actions/.github/workflows/maven-pre-release.yml@modules
release:
needs: pre-release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ needs.pre-release.outputs.tag }}
- name: Setup Java and Apache Maven
uses: actions/setup-java@v3
with:
distribution: 'oracle'
java-version: '17'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_CENTRAL_TOKEN
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Publish Release
id: deploy
run: |
pwd
ls
mvn -B -ntp clean deploy -Prelease -pl 'emoji, offline' -am
echo ::set-output name=exit_code::$?
env:
MAVEN_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.SONATYPE_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
post-release:
needs: [ pre-release, release ]
uses: gluonhq/actions/.github/workflows/maven-post-release.yml@v1
with:
tag: ${{ needs.pre-release.outputs.tag }}
nextVersion: ${{ github.event.inputs.nextVersion }}