diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2ac3f0e..1f928f4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,7 +1,6 @@ name: Upload Python Package on: - workflow_dispatch: release: types: [published] @@ -10,12 +9,15 @@ permissions: jobs: pypi-publish: - name: upload release to PyPI + name: Upload release to PyPI + if: | + startsWith(github.ref, 'refs/tags/') && ( + contains(github.ref, 'refs/tags/main') || + (contains(github.ref, 'refs/tags/feat') && (contains(github.ref, 'alpha') || contains(github.ref, 'beta'))) + ) runs-on: ubuntu-latest - # Specifying a GitHub environment is optional, but strongly encouraged environment: release permissions: - # IMPORTANT: this permission is mandatory for trusted publishing id-token: write steps: diff --git a/pyproject.toml b/pyproject.toml index cb66655..14fa586 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ allow-direct-references = true [project] name = "testproject_1" -version = "0.1.1" +version = "0.1.2" authors = [ { name="p0pe" }, ]