From f9e73aa62ed12d0dea615308362f2218fa15a9fb Mon Sep 17 00:00:00 2001 From: Alexandru Popenta Date: Mon, 1 Apr 2024 12:42:42 +0300 Subject: [PATCH] update release action --- .github/workflows/release.yml | 10 ++++++---- pyproject.toml | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) 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" }, ]