Skip to content

Commit 5a8ebce

Browse files
authored
Fix tag recognition inside conditional job/stages (#45)
1 parent 1701d8e commit 5a8ebce

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ on: [push]
1313

1414
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1515
jobs:
16-
1716
# This job builds wheels for Windows x86_64 arch
1817
build-windows-x86_64:
1918
runs-on: windows-latest
@@ -67,7 +66,7 @@ jobs:
6766
with:
6867
python-version: ${{ matrix.python-version }}
6968
- name: Append build hash if not a tagged commit
70-
if: github.ref != 'refs/tags/*'
69+
if: startsWith(github.ref, 'refs/tags/v') != true
7170
run: echo '::set-env name=BUILD_COMMIT_HASH::${{github.sha}}'
7271
- name: Install dependencies
7372
run: |
@@ -195,7 +194,7 @@ jobs:
195194

196195
# Deploy to PyPi. Only when a commit is tagged
197196
deploy-pypi:
198-
if: github.ref == 'refs/tags/*'
197+
if: startsWith(github.ref, 'refs/tags/v')
199198
runs-on: ubuntu-latest
200199
needs: tests
201200
steps:

0 commit comments

Comments
 (0)