From ede06e2ca87c8697279f9fc6c3871faf1e0823e9 Mon Sep 17 00:00:00 2001 From: Jon Beniston Date: Thu, 31 Oct 2024 16:05:50 +0000 Subject: [PATCH] Fix version name. --- .github/workflows/snap.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/snap.yml b/.github/workflows/snap.yml index 237626017..4cf82f584 100644 --- a/.github/workflows/snap.yml +++ b/.github/workflows/snap.yml @@ -17,11 +17,16 @@ jobs: with: submodules: true fetch-depth: 0 - - uses: snapcore/action-build@v1 - id: snapcraft - name: Get version id: get_version - run: echo "version=$(echo ${{github.ref_name}} | cut -c2-)" >> $env:GITHUB_OUTPUT + run: | + if [[ "${{github.ref_name}" == "snap" ]]; then + echo "version=${{github.sha}}" >> $GITHUB_OUTPUT + else + echo "version=$(echo ${{github.ref_name}} | cut -c2-)" >> $GITHUB_OUTPUT + fi + - uses: snapcore/action-build@v1 + id: snapcraft - name: Upload artifact uses: actions/upload-artifact@v3 with: