diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 186b025..c90ef5b 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -11,8 +11,8 @@ on: push: branches: - main - # tags: - # - "v[0-9]+*" + tags: + - "v[0-9]+*" jobs: build: @@ -75,7 +75,7 @@ jobs: dist/*/*.whl # create release if it's a tag like vx.y.z - - if: github.repository == 'chengzeyi/stable-fast' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') + - if: github.repository == 'chengzeyi/stable-fast' && github.ref_type == 'tag' && startsWith(github.ref, 'refs/tags/v') name: Release uses: softprops/action-gh-release@v1 with : diff --git a/.github/workflows/wheels_build.yml b/.github/workflows/wheels_build.yml index 7ac1a99..072ff33 100644 --- a/.github/workflows/wheels_build.yml +++ b/.github/workflows/wheels_build.yml @@ -110,7 +110,7 @@ jobs: - name: Define version id: sfast_version env: - VERSION_SOURCE: ${{ github.ref_type == 'tag' && 'tag' || 'dev' }} + VERSION_SOURCE: ${{ github.ref_type == 'tag' && 'tag' || 'dev' }} run: | set -Eeuo pipefail git config --global --add safe.directory "*"