Skip to content

Commit

Permalink
tweak CI tag/version check
Browse files Browse the repository at this point in the history
  • Loading branch information
avaldebe committed Jul 8, 2021
1 parent 958c4a1 commit 5a367d5
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions .github/workflows/new_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,21 +47,22 @@ jobs:
run: |
poetry install
poetry run pytest
- name: Package version
run: echo "VERSION=$(poetry version -s)" >> $GITHUB_ENV
- name: Package version vs Git tag
run: |
echo "SEM_VER=$(poetry version -s)" >> $GITHUB_ENV
echo "GIT_TAG=$(git describe)" >> $GITHUB_ENV
test $SEM_VER = $GIT_TAG
if: ${{ !endsWith(github.ref, env.VERSION) }}
run: exit 1


release:
runs-on: ubuntu-latest
after: [docs, test]
steps:
- uses: actions/checkout@v2
- name: Release
uses: softprops/action-gh-release@v1
with:
draft: true
body_path: README.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
release:
runs-on: ubuntu-latest
needs: [docs, test]
steps:
- uses: actions/checkout@v2
- name: Release
uses: softprops/action-gh-release@v1
with:
draft: true
body_path: README.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 5a367d5

Please sign in to comment.