Skip to content

Commit af07ef1

Browse files
committed
Don't bump version of tagged release
1 parent 1234e43 commit af07ef1

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

.github/workflows/publish.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,21 @@ jobs:
1515
- uses: actions/checkout@v2
1616
with:
1717
fetch-depth: 0
18-
- name: Determine package version
19-
id: vars
20-
run: |
21-
[[ ! $GITHUB_REF == refs/tags/* ]] && echo ::set-output name=version::$(git describe --tags | sed -r 's/-(.*?)-(.*?)$/.dev\1/g') || true
22-
[[ $GITHUB_REF == refs/tags/* ]] && echo ::set-output name=version::${GITHUB_REF#refs/*/} || true
2318
- name: Set up Python ${{ matrix.python-version }}
2419
uses: actions/setup-python@v2
2520
with:
2621
python-version: 3.8
2722
- name: Install build packages
2823
run: pip install wheel bumpversion
24+
- name: Determine package version
25+
id: vars
26+
run: |
27+
[[ ! $GITHUB_REF == refs/tags/* ]] && echo ::set-output name=version::$(git describe --tags | sed -r 's/-(.*?)-(.*?)$/.dev\1/g') || true
28+
[[ $GITHUB_REF == refs/tags/* ]] && echo ::set-output name=version::${GITHUB_REF#refs/*/} || true
29+
if: ${{ !startsWith(github.ref, 'refs/tags') }}
2930
- name: Bump version number
3031
run: bumpversion patch --new-version ${{ steps.vars.outputs.version }} --no-tag --no-commit --verbose
32+
if: ${{ !startsWith(github.ref, 'refs/tags') }}
3133
- name: 🐍 Build package
3234
run: python setup.py sdist bdist_wheel
3335
- name: 📦 Publish package to TestPyPI

0 commit comments

Comments
 (0)