From 3b9af427fd71a9b935131050d288c16de97f77a3 Mon Sep 17 00:00:00 2001 From: Arseny Boykov <36469655+Bobronium@users.noreply.github.com> Date: Thu, 9 May 2024 09:23:12 +0200 Subject: [PATCH] Fix archive name depending on tag/branch --- .github/workflows/build.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index b9a2a15..73570ec 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -24,13 +24,13 @@ jobs: run: ls && ls build/Release - name: Archive Build Artifacts - run: zip -r Switcher-${{ github.ref_name == contains(github.ref, 'refs/tags/v') && github.ref_name || github.run_number }}.zip build/Release + run: zip -r Switcher-${{ github.ref_type == 'tag' && github.ref_name || github.sha }}.zip build/Release - name: Upload Build Artifacts uses: actions/upload-artifact@v3 with: name: Switcher-Build - path: Switcher-${{ github.ref_name == contains(github.ref, 'refs/tags/v') && github.ref_name || github.run_number }}.zip + path: Switcher-${{ github.ref_type == 'tag' && github.ref_name || github.sha }}.zip release: name: Release Switcher @@ -38,7 +38,7 @@ jobs: contents: write runs-on: macos-latest needs: build - if: startsWith(github.ref, 'refs/tags/v') + if: github.ref_type == 'tag' steps: - name: Checkout code uses: actions/checkout@v3