-
Notifications
You must be signed in to change notification settings - Fork 58
30 lines (30 loc) · 1.08 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
name: Release Workflow
on:
push:
tags:
- '*'
jobs:
build:
if: github.event.base_ref == 'refs/heads/master'
environment: ci
runs-on: 'ubuntu-20.04'
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
java-version: 8
distribution: "temurin"
- run: |
cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import
gpg --list-secret-keys --keyid-format LONG
- name: Get tag
id: tag
uses: dawidd6/action-get-tag@v1
- run: |
echo "on a tag -> set pom.xml <version> to ${{steps.tag.outputs.tag}}"
mvn --settings .mvn/settings.xml org.codehaus.mojo:versions-maven-plugin:set -DnewVersion=${{steps.tag.outputs.tag}}
mvn --no-transfer-progress --batch-mode --settings .mvn/settings.xml clean javadoc:jar deploy -P notest -P signed
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
GPG_KEY_PASSPHRASE: ${{ secrets.GPG_KEY_PASSPHRASE }}