Skip to content

Commit eea08f1

Browse files
committed
More release flow tweaks
1 parent 3d46b51 commit eea08f1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/test.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ jobs:
3636

3737
publish:
3838
name: Publish to PyPI
39+
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
3940
runs-on: ubuntu-latest
4041

4142
needs: test
@@ -52,7 +53,7 @@ jobs:
5253

5354
- name: Insert version number
5455
run: |
55-
version=$(echo $GITHUB_REF | cut -d/ -f3)
56+
version=$(echo $GITHUB_REF | sed -e 's#refs/tags/v##')
5657
sed -i -Ee "/__version/s/[0-9.]+/$version/" src/lingua/__init__.py
5758
5859
- name: Build wheel
@@ -63,7 +64,6 @@ jobs:
6364
flit build
6465
6566
- name: Publish to PyPI
66-
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
6767
uses: pypa/gh-action-pypi-publish@release/v1
6868
with:
6969
user: __token__

0 commit comments

Comments
 (0)