-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (37 loc) · 1.65 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
name: Build Release
on: [ workflow_dispatch ]
jobs:
release:
name: Build Release
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
cache: 'maven'
- name: Prepare Maven Release
run: |
git config user.name github-actions
git config user.email [email protected]
./mvnw -B release:prepare -DtagNameFormat='@{project.version}' -Darguments='-Dmaven.javadoc.skip -Dmaven.source.skip'
- name: Determin Release Tag
run: |
echo "GIT_TAG=$(awk -F= '/^scm.tag=/ {print $2}' release.properties)" >> $GITHUB_ENV
- name: Perform Maven Release
run: |
./mvnw -B release:perform -Dusername=${{ github.actor }} -Dpassword=${{ secrets.GITHUB_TOKEN }} -Dgoals=package -Darguments='-Dmaven.javadoc.skip'
- name: Sign Artifacts
run: |
echo -e "${{ secrets.GPG_SECRET_KEY }}" | gpg --batch --import
for file in target/checkout/plugin/target/apm-activemq-artemis-destination-plugin-*.jar; do
gpg --batch --pinentry-mode loopback --passphrase "${{ secrets.GPG_SECRET_KEY_PASSPHRASE }}" --output $file.sig --sign --detach-sig $file
done
- name: Create GitHub Release
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
draft: false
tag: ${{ env.GIT_TAG }}
artifacts: target/checkout/plugin/target/apm-activemq-artemis-destination-plugin-*.jar,target/checkout/plugin/target/apm-activemq-artemis-destination-plugin-*.jar.sig