diff --git a/.github/workflows/compilation.yml b/.github/workflows/compilation.yml index 1fef2db..0755196 100644 --- a/.github/workflows/compilation.yml +++ b/.github/workflows/compilation.yml @@ -25,18 +25,17 @@ jobs: - name: Compile project run: | make + # commands for compiling your project - - name: Get short SHA and repository name + - name: Get short SHA id: slug - run: | - echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)" - echo "::set-output name=REPOSITORY_NAME::$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}' | sed -e "s/:refs//")" + run: echo "sha8=$(echo ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_OUTPUT - name: Upload artifacts if: ${{ success() }} uses: actions/upload-artifact@v3 with: - name: ${{ steps.slug.outputs.REPOSITORY_NAME }}-${{ steps.slug.outputs.sha8 }} + name: MechaPwn-${{ steps.slug.outputs.sha8 }} path: MechaPwn_pck.elf if-no-files-found: error @@ -49,20 +48,18 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Get short SHA and repository name + - name: Get short SHA id: slug - run: | - echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)" - echo "::set-output name=REPOSITORY_NAME::$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}' | sed -e "s/:refs//")" + run: echo "sha8=$(echo ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_OUTPUT - name: Download artifact uses: actions/download-artifact@v3 with: - name: ${{ steps.slug.outputs.REPOSITORY_NAME }}-${{ steps.slug.outputs.sha8 }} + name: MechaPwn-${{ steps.slug.outputs.sha8 }} path: MechaPwn - name: Prepare MechaPwn archive - run: 7z a ${{ steps.slug.outputs.REPOSITORY_NAME }}-${{ steps.slug.outputs.sha8 }}.7z MechaPwn/* + run: 7z a MechaPwn-${{ steps.slug.outputs.sha8 }}.7z MechaPwn/* - name: Create pre-release if: github.ref == 'refs/heads/master' @@ -72,7 +69,7 @@ jobs: prerelease: true automatic_release_tag: latest title: Development build - files: ${{ steps.slug.outputs.REPOSITORY_NAME }}-${{ steps.slug.outputs.sha8 }}.7z + files: MechaPwn-${{ steps.slug.outputs.sha8 }}.7z - name: Create Tagged Release Draft if: startsWith(github.ref, 'refs/tags/v') @@ -82,4 +79,4 @@ jobs: prerelease: false draft: true automatic_release_tag: RenameMe - files: ${{ steps.slug.outputs.REPOSITORY_NAME }}-${{ steps.slug.outputs.sha8 }}.7z + files: MechaPwn-${{ steps.slug.outputs.sha8 }}.7z