From 967dbc41797bdf55c9969a3317faff327fa4b08f Mon Sep 17 00:00:00 2001 From: mio Date: Thu, 13 Feb 2025 19:20:43 +0800 Subject: [PATCH] Allow a v-prefixed version --- .github/workflows/Crate-publishing.yml | 2 +- .github/workflows/Nuget-publishing.yml | 4 ++-- .github/workflows/build-wheels-publish.yml | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/Crate-publishing.yml b/.github/workflows/Crate-publishing.yml index 19a8029b..dbdfb0d7 100644 --- a/.github/workflows/Crate-publishing.yml +++ b/.github/workflows/Crate-publishing.yml @@ -75,7 +75,7 @@ jobs: cargo test - name: '📦 Cargo Publish' - if: startsWith(github.ref, 'refs/tags') && contains(matrix.config.os, 'ubuntu') + if: startsWith(github.ref, 'refs/tags') && !startsWith(github.ref, 'refs/tags/v') && contains(matrix.config.os, 'ubuntu') env: TOKEN: ${{ secrets.cratesio_token }} UNICORN_VERSION: dev diff --git a/.github/workflows/Nuget-publishing.yml b/.github/workflows/Nuget-publishing.yml index ecf568e5..fe431c2e 100644 --- a/.github/workflows/Nuget-publishing.yml +++ b/.github/workflows/Nuget-publishing.yml @@ -429,12 +429,12 @@ jobs: path: ${{ github.workspace }}/bindings/dotnet/UnicornEngine/bin/Release/UnicornEngine.Unicorn.*.nupkg - name: 📦 Publish to Github Packages - if: startsWith(github.ref, 'refs/tags') + if: startsWith(github.ref, 'refs/tags') && !startsWith(github.ref, 'refs/tags/v') working-directory: bindings/dotnet/UnicornEngine run: dotnet nuget push "bin/Release/UnicornEngine.Unicorn.*.nupkg" --source "github" --api-key "${{ secrets.GHPR_TOKEN }}" - name: 📦 Publish Nuget package - if: startsWith(github.ref, 'refs/tags') + if: startsWith(github.ref, 'refs/tags') && !startsWith(github.ref, 'refs/tags/v') working-directory: bindings/dotnet/UnicornEngine run: dotnet nuget push "bin/Release/UnicornEngine.Unicorn.*.nupkg" -k "$NUGET_AUTH_TOKEN" -s https://api.nuget.org/v3/index.json env: diff --git a/.github/workflows/build-wheels-publish.yml b/.github/workflows/build-wheels-publish.yml index bec9795e..127c3ac6 100644 --- a/.github/workflows/build-wheels-publish.yml +++ b/.github/workflows/build-wheels-publish.yml @@ -34,7 +34,7 @@ on: env: # Enable DEBUG flag either according to the tag release or manual override - UNICORN_DEBUG: ${{ inputs.debugMode != '' && inputs.debugMode || startsWith(github.ref, 'refs/tags') && '0' || contains(github.event.head_commit.message, 'CI(release)') && '0' || '1' }} + UNICORN_DEBUG: ${{ inputs.debugMode != '' && inputs.debugMode || (startsWith(github.ref, 'refs/tags') && !startsWith(github.ref, 'refs/tags/v')) && '0' || contains(github.event.head_commit.message, 'CI(release)') && '0' || '1' }} jobs: # job to be executed for every push - testing purpose @@ -218,7 +218,7 @@ jobs: - { os: macos-latest, arch: arm64, cibw_build: 'cp*', cibw_skip: '*36* *37* *38*' } - { os: windows-2022, arch: AMD64, cibw_build: 'cp*', cibw_skip: '*36* *38*' } - { os: windows-2022, arch: x86, cibw_build: 'cp*', cibw_skip: '*36* *38*' } - if: ${{ inputs.fullMode == 1 || startsWith(github.ref, 'refs/tags') || contains(github.event.head_commit.message, 'CI(full)') }} + if: ${{ inputs.fullMode == 1 || (startsWith(github.ref, 'refs/tags') && !startsWith(github.ref, 'refs/tags/v')) || contains(github.event.head_commit.message, 'CI(full)') }} steps: - uses: actions/checkout@v4 with: @@ -310,7 +310,7 @@ jobs: permissions: id-token: write runs-on: ubuntu-latest - if: startsWith(github.ref, 'refs/tags') + if: startsWith(github.ref, 'refs/tags') && !startsWith(github.ref, 'refs/tags/v') steps: - uses: actions/download-artifact@v4 with: