From 6f9d29f27d2ec6ee0927f8d01cd0a876a0c9e332 Mon Sep 17 00:00:00 2001 From: ErdbeerbaerLP Date: Mon, 10 Jun 2024 15:41:22 +0200 Subject: [PATCH] Revert recent changes, try different approach to format sha --- .github/workflows/maven-publish.yml | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml index 50c850729..a2c5ae58c 100644 --- a/.github/workflows/maven-publish.yml +++ b/.github/workflows/maven-publish.yml @@ -29,17 +29,14 @@ jobs: - name: Build with Maven run: mvn --batch-mode --update-snapshots verify - - name: Add SHORT_SHA env property with commit short sha - run: echo "SHORT_SHA=`echo ${github.sha} | cut -c1-8`" >> $GITHUB_ENV - - name: Rename jar - run: mv target/*-All.jar JMusicBot-${ SHORT_SHA }.jar + run: mv target/*-All.jar JMusicBot-${{ github.sha::7 }}.jar - name: Upload jar uses: actions/upload-artifact@v3 with: name: jar - path: JMusicBot-${ SHORT_SHA }.jar + path: JMusicBot-${{ github.sha::7 }}.jar if-no-files-found: error create_release: @@ -53,9 +50,6 @@ jobs: ref: 'jda5' fetch-depth: '0' - - name: Add SHORT_SHA env property with commit short sha - run: echo "SHORT_SHA=`echo ${{github.sha}} | cut -c1-8`" >> $GITHUB_ENV - - name: Download a Build Artifact uses: actions/download-artifact@v3.0.0 with: @@ -72,12 +66,13 @@ jobs: commits=$(git log --pretty=format:'%h: %s' $commit_range) echo "commits=$commits" >> $GITHUB_ENV + - name: Create Release uses: ncipollo/release-action@v1 with: token: ${{ secrets.GITHUB_TOKEN }} - tag: ${ SHORT_SHA } - name: Version ${ SHORT_SHA } + tag: ${{ github.sha::7 }} + name: Version ${{ github.sha::7 }} draft: true prerelease: false artifacts: "*.jar" @@ -89,4 +84,4 @@ jobs: ### Setup https://jmusicbot.com/setup https://jmusicbot.com/config - # Download: [JMusicBot-${ SHORT_SHA }.jar](https://github.com/ErdbeerbaerLP/MusicBot/releases/download/${ SHORT_SHA }/JMusicBot-${ SHORT_SHA }.jar) + # Download: [JMusicBot-${{ github.sha::7 }}.jar](https://github.com/ErdbeerbaerLP/MusicBot/releases/download/${{ github.sha::7 }}/JMusicBot-${{ github.sha::7 }}.jar)