From 6cb77b4c9cff1577861128d285c692295e775b0a Mon Sep 17 00:00:00 2001 From: Josscoder Date: Wed, 8 Mar 2023 21:50:35 -0500 Subject: [PATCH] [Release] --- .github/workflows/maven.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index eb621a6..6af4a99 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -9,9 +9,6 @@ on: pull_request: branches: [ "master" ] -env: - VERSION: "1.0.1" - jobs: build: name: Create Build @@ -31,16 +28,21 @@ jobs: - name: Build run: mvn clean package + - name: Get Maven version + run: | + VERSION=$(mvn -q -Dexec.executable='echo' -Dexec.args='${project.version}' --non-recursive exec:exec) + echo "VERSION=${VERSION}" >> $GITHUB_ENV + - name: Upload Artifact uses: ncipollo/release-action@v1.10.0 with: artifacts: ${{ github.workspace }}/target/*.jar draft: false name: Release v${{ env.VERSION }} - tag: v${{ env.VERSION }} + tag: ${{ env.VERSION }} token: ${{ secrets.GITHUB_TOKEN }} body: "The artifacts are kept up to date with the branch release." commit: ${{ github.sha }} allowUpdates: true removeArtifacts: true - replacesArtifacts: true \ No newline at end of file + replacesArtifacts: true