-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (45 loc) · 1.37 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
51
52
53
name: Release
on:
workflow_dispatch:
inputs:
version:
description: 'Release version'
required: true
env:
GH_USER_NAME: github.actor
RELEASE_VERSION: ${{ github.event.inputs.version }}
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: '11'
- name: Update version
run: mvn versions:set -DnewVersion=${{env.RELEASE_VERSION}} -DgenerateBackupPoms=false
- name: Set up GPG
run: |
echo "$GPG_PRIVATE_KEY" > private.asc
gpg --import --batch private.asc
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
- name: Release with Maven
run: |
mvn -B -Pdeploy -Dgpg.passphrase=${GPG_PASSPHRASE} -DcreateChecksum=true clean deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
- name: Create Release
id: createRelease
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{env.RELEASE_VERSION}}
release_name: Release ${{env.RELEASE_VERSION}}
draft: false
prerelease: false