Skip to content

Commit

Permalink
Don't bump version of tagged release
Browse files Browse the repository at this point in the history
  • Loading branch information
Bouke committed Jul 8, 2020
1 parent 1234e43 commit af07ef1
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,21 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Determine package version
id: vars
run: |
[[ ! $GITHUB_REF == refs/tags/* ]] && echo ::set-output name=version::$(git describe --tags | sed -r 's/-(.*?)-(.*?)$/.dev\1/g') || true
[[ $GITHUB_REF == refs/tags/* ]] && echo ::set-output name=version::${GITHUB_REF#refs/*/} || true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install build packages
run: pip install wheel bumpversion
- name: Determine package version
id: vars
run: |
[[ ! $GITHUB_REF == refs/tags/* ]] && echo ::set-output name=version::$(git describe --tags | sed -r 's/-(.*?)-(.*?)$/.dev\1/g') || true
[[ $GITHUB_REF == refs/tags/* ]] && echo ::set-output name=version::${GITHUB_REF#refs/*/} || true
if: ${{ !startsWith(github.ref, 'refs/tags') }}
- name: Bump version number
run: bumpversion patch --new-version ${{ steps.vars.outputs.version }} --no-tag --no-commit --verbose
if: ${{ !startsWith(github.ref, 'refs/tags') }}
- name: 🐍 Build package
run: python setup.py sdist bdist_wheel
- name: 📦 Publish package to TestPyPI
Expand Down

0 comments on commit af07ef1

Please sign in to comment.