From e3f35ee3648215ac3af534d37146068a3aafb5fe Mon Sep 17 00:00:00 2001 From: James Stevenson Date: Thu, 16 Nov 2023 13:24:26 -0500 Subject: [PATCH 1/3] build: add release action --- .github/workflows/release.yaml | 50 ++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..8fc661d --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,50 @@ +# https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/ +name: Publish Python distribution to PyPI + +on: + release: + types: [created] + +jobs: + build: + name: Build distribution + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v4 + 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@v3 + with: + name: python-package-distributions + path: dist/ + publish-to-pypi: + name: >- + Publish Python distribution to PyPI + needs: + - build + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/thera-py + permissions: + id-token: write # IMPORTANT: mandatory for trusted publishing + steps: + - name: Download all the dists + uses: actions/download-artifact@v3 + with: + name: python-package-distributions + path: dist/ + - name: Publish distribution to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 From b38cbf9ea569c2fc092923f5a01aa110c96cf0ee Mon Sep 17 00:00:00 2001 From: James Stevenson Date: Thu, 16 Nov 2023 15:22:08 -0500 Subject: [PATCH 2/3] :( --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 8fc661d..43af2cd 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -37,7 +37,7 @@ jobs: runs-on: ubuntu-latest environment: name: pypi - url: https://pypi.org/p/thera-py + url: https://pypi.org/p/wags-tails permissions: id-token: write # IMPORTANT: mandatory for trusted publishing steps: From 8c1b8ff6d3074c79c0eca623c8e5b330f855abe4 Mon Sep 17 00:00:00 2001 From: James Stevenson Date: Thu, 16 Nov 2023 15:23:55 -0500 Subject: [PATCH 3/3] can i put emojis in commits? :sad_but_relieved_face: --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 43af2cd..2e51a85 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -39,7 +39,7 @@ jobs: name: pypi url: https://pypi.org/p/wags-tails permissions: - id-token: write # IMPORTANT: mandatory for trusted publishing + id-token: write # IMPORTANT: mandatory for trusted publishing steps: - name: Download all the dists uses: actions/download-artifact@v3