test-release-version #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test Sign | |
on: | |
push: | |
branches-ignore: | |
- 'master' | |
jobs: | |
deploy: | |
if: ${{ github.ref_type == 'tag' }} | |
name: Test version | |
runs-on: ubuntu-latest | |
environment: deploy | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: adopt | |
- name: GitHub Tag Name | |
run: | | |
echo "Tag name from GITHUB_REF_NAME: $GITHUB_REF_NAME" | |
echo "Tag name from github.ref_name: ${{ github.ref_name }}" | |
echo "github.ref_type: ${{ github.ref_type }}" | |
- name: Get Version from Maven | |
run: | | |
MVN_VERSION=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec) | |
echo "MVN_VERSION: $MVN_VERSION" | |
- name: Fail on version missmatch | |
run: if [[ "$MVN_VERSION" != "${{ github.ref_name }}" ]]; then exit 1; fi | |
- name: Build and Deploy with Maven | |
run: mvn -B -P sign-artifacts package --no-transfer-progress | |
env: | |
MAVEN_GPG_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} |