Skip to content

Commit

Permalink
test-release-version
Browse files Browse the repository at this point in the history
  • Loading branch information
helios57 committed Apr 22, 2024
1 parent 7b43233 commit 7fe144c
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/test-release-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
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

0 comments on commit 7fe144c

Please sign in to comment.