From 47d1a7f9b2c5f38fa98b590d5d2024650f2943a4 Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Sat, 6 Dec 2025 23:48:23 +0100 Subject: [PATCH 1/3] ci: publish releases to test.pypi.org This first iteration of the workflow publishes the release to test.pypi.org only. --- .github/workflows/release.yml | 57 +++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..f1eff83f2 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,57 @@ +name: Make releases + +on: + push: + tags: + - v[0-9]+.[0-9]+ + - v[0-9]+.[0-9]+.[0-9]+ + create: + tags: + - v[0-9]+.[0-9]+ + - v[0-9]+.[0-9]+.[0-9]+ + +jobs: + + build: + name: Build distribution package + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v6 + with: + persist-credentials: false + - name: Set up Python + uses: actions/setup-python@v6 + with: + python-version: "3.x" + + - name: Install pypa/build + run: python3 -m pip install build --user + - name: Build a binary wheel and a source tarball + run: python3 -m build + - name: Store the distribution packages + uses: actions/upload-artifact@v5 + with: + name: python-package-distributions + path: dist/ + + publish-to-pypi: + name: Publish to PyPI + if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes + needs: + - build + runs-on: ubuntu-latest + environment: + name: pypi + url: https://test.pypi.org/p/alot + permissions: + id-token: write # IMPORTANT: mandatory for trusted publishing + + steps: + - name: Download all the dists + uses: actions/download-artifact@v6 + with: + name: python-package-distributions + path: dist/ + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 From 403bd131e4da9fd7bec1a311238f85a9968fbd00 Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Sun, 7 Dec 2025 08:17:39 +0100 Subject: [PATCH 2/3] TMP: test automatic deploys on PR branch --- .github/workflows/release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f1eff83f2..ac36d4260 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,6 +5,8 @@ on: tags: - v[0-9]+.[0-9]+ - v[0-9]+.[0-9]+.[0-9]+ + branches: + - pypi-publishing # TODO for testing only create: tags: - v[0-9]+.[0-9]+ From c7a9ea95744ae553b6ce1e91adeaea0fc07cd2c4 Mon Sep 17 00:00:00 2001 From: Lucas Hoffmann Date: Sun, 7 Dec 2025 08:24:53 +0100 Subject: [PATCH 3/3] TMP: run deploy job not only on tags --- .github/workflows/release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ac36d4260..229711bd9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,7 +39,8 @@ jobs: publish-to-pypi: name: Publish to PyPI - if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes + # TODO temporarily disabled + #if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes needs: - build runs-on: ubuntu-latest