From 8d8f8d734a49d1d46301edd6b0b7f8e3b7985ce7 Mon Sep 17 00:00:00 2001 From: Brady Johnston Date: Thu, 19 Dec 2024 07:56:39 +0800 Subject: [PATCH] add ci-cd --- .github/workflows/ci-cd.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/ci-cd.yml diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml new file mode 100644 index 0000000..b04f5f6 --- /dev/null +++ b/.github/workflows/ci-cd.yml @@ -0,0 +1,32 @@ +on: + push: + tags: + - 'v*' + +jobs: + pypi-publish: + name: Upload release to PyPI + # if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/databpy + permissions: + id-token: write + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.11' + - name: Install uv + uses: astral-sh/setup-uv@v4 + with: + version: "latest" + - name: build + run: | + uv build + + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 \ No newline at end of file