From 8fd928a48c576da693d6cb9935cee1f3bb924bb6 Mon Sep 17 00:00:00 2001 From: Adrien Vannson Date: Fri, 20 Dec 2024 14:58:15 +0100 Subject: [PATCH 1/3] Prepare for release --- .github/workflows/release.yml | 22 ++++++++++++++++------ pyproject.toml | 2 +- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c81ae974..e9dc7fc8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,18 +14,28 @@ jobs: packaging: name: Distribution runs-on: ubuntu-latest + + permissions: + id-token: write + + environment: + name: pypi + url: https://pypi.org/p/betterproto2_compiler + steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + - name: Set up Python 3.10 uses: actions/setup-python@v4 with: python-version: "3.10" + - name: Install poetry run: python -m pip install poetry + - name: Build package run: poetry build - - name: Publish package to PyPI - if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') - env: - POETRY_PYPI_TOKEN_PYPI: ${{ secrets.pypi }} - run: poetry publish -n + + - name: Publish package distributions to PyPI + # if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') + uses: pypa/gh-action-pypi-publish@release/v1.12 diff --git a/pyproject.toml b/pyproject.toml index ac849b57..c83895c2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "betterproto2_compiler" -version = "2.0.0b7" +version = "0.0.1" description = "Compiler for betterproto2" authors = ["Adrien Vannson ", "Daniel G. Taylor "] readme = "README.md" From a69ce895198474dcd303be507b8e63b8b4284162 Mon Sep 17 00:00:00 2001 From: Adrien Vannson Date: Fri, 20 Dec 2024 17:06:19 +0100 Subject: [PATCH 2/3] Update version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c83895c2..0dd6045a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "betterproto2_compiler" -version = "0.0.1" +version = "0.0.2" description = "Compiler for betterproto2" authors = ["Adrien Vannson ", "Daniel G. Taylor "] readme = "README.md" From cd43f672594ae15dbea41286e525decc6c8650a2 Mon Sep 17 00:00:00 2001 From: Adrien Vannson Date: Fri, 20 Dec 2024 17:09:39 +0100 Subject: [PATCH 3/3] Publish only on tags --- .github/workflows/release.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e9dc7fc8..10e68585 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,12 +6,10 @@ on: - main tags: - '**' - pull_request: - branches: - - '**' jobs: packaging: + if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') name: Distribution runs-on: ubuntu-latest @@ -37,5 +35,4 @@ jobs: run: poetry build - name: Publish package distributions to PyPI - # if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') uses: pypa/gh-action-pypi-publish@release/v1.12