Skip to content

Commit

Permalink
Merge pull request #6 from willow-ahrens/wma/newtag
Browse files Browse the repository at this point in the history
Wma/newtag
  • Loading branch information
willow-ahrens authored Jan 26, 2024
2 parents f6afce0 + 254bf74 commit 64f1845
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
workflow_dispatch:
jobs:
build:
#if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -13,18 +14,21 @@ jobs:
- name: Install dependencies
run: pip install toml
- name: Get version
run: echo "VERSION=$(python -c 'import toml; print(toml.load(\"pyproject.toml\")[\"tool\"][\"poetry\"][\"version\"])')" >> $GITHUB_ENV
- name: Build and publish to pypi
uses: JRubics/poetry-publish@v1.17
with:
pypi_token: ${{ secrets.PYPI_TOKEN }}
run: |
VERSION=$(python -c 'import toml; print("v" + toml.load("pyproject.toml")["tool"]["poetry"]["version"])')
if [ $? -ne 0 ]; then exit 1; fi
echo "VERSION=$VERSION" >> $GITHUB_ENV
#- name: Build and publish to pypi
# uses: JRubics/poetry-publish@v1.17
# with:
# pypi_token: ${{ secrets.PYPI_TOKEN }}
- name: Create Release
uses: actions/create-release@v1
if: success()
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ env.VERSION }}
release_name: Release v${{ env.VERSION }}
tag_name: ${{ env.VERSION }}
release_name: Release ${{ env.VERSION }}
draft: false
prerelease: false

0 comments on commit 64f1845

Please sign in to comment.