From d2cae1690e806756a5b6381dc2994dd4f319b203 Mon Sep 17 00:00:00 2001 From: Nathaniel van Diepen Date: Fri, 15 Dec 2023 21:42:30 -0700 Subject: [PATCH] Add pypi upload --- .github/workflows/{checks.yml => build.yml} | 26 +++++++++++++++++++-- pyproject.toml | 2 +- 2 files changed, 25 insertions(+), 3 deletions(-) rename .github/workflows/{checks.yml => build.yml} (80%) diff --git a/.github/workflows/checks.yml b/.github/workflows/build.yml similarity index 80% rename from .github/workflows/checks.yml rename to .github/workflows/build.yml index 8d55ac1..88aaef4 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/build.yml @@ -1,5 +1,10 @@ -name: checks -on: [push, pull_request, workflow_dispatch] +name: Check and Build +on: + push: + branches: + - main + pull_request: + workflow_dispatch: permissions: read-all jobs: format: @@ -103,3 +108,20 @@ jobs: with: name: toltecmk path: toltecmk + publish: + name: Publish to PyPi + runs-on: ubuntu-20 + needs: [build] + if: github.repository == 'toltec-dev/build' && github.event_name == 'push' && startsWith(github.ref, 'refs/tags') + permissions: + id-token: write + environment: + name: pypi + url: https://pypi.org/p/toltecmk + steps: + - name: Download pip packages + uses: action/download-artifact@v4 + with: + name: pip + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/pyproject.toml b/pyproject.toml index a32f463..10d1edc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "toltecmk" -version = "0.2.1" +version = "0.3.0" authors = [ { name="Mattéo Delabre", email="git.matteo@delab.re" }, { name="Eeems", email="eeems@eeems.email" },