Skip to content

Commit

Permalink
fix: fix ga workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
en9inerd committed Sep 26, 2023
1 parent e3e3138 commit 317e28f
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 5 deletions.
24 changes: 21 additions & 3 deletions .github/workflows/publish_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,32 @@ jobs:
release:
runs-on: ubuntu-latest
concurrency: release
permissions:
id-token: write

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0

# This action uses Python Semantic Release v8
- name: Python Semantic Release
uses: relekang/python-semantic-release@master
id: release
uses: python-semantic-release/python-semantic-release@v8.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
# NOTE: DO NOT wrap the conditional in ${{ }} as it will always evaluate to true.
# See https://github.com/actions/runner/issues/1173
if: steps.release.outputs.released == 'true'

- name: Publish package distributions to GitHub Releases
uses: python-semantic-release/upload-to-gh-release@main
if: steps.release.outputs.released == 'true'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
pypi_token: ${{ secrets.PYPI_TOKEN }}
10 changes: 9 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"
build-backend = "setuptools.build_meta"

[tool.semantic_release]
version_variables = [
"tgeraser/__version__.py:VERSION",
]

[tool.semantic_release.remote.token]
env = "GITHUB_TOKEN"
2 changes: 1 addition & 1 deletion tgeraser/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
Version file
"""

VERSION = "1.1.2"
VERSION = "1.2.0"

0 comments on commit 317e28f

Please sign in to comment.