From 2eb6359022e14e78e629245d1cb2aa80d9d2decb Mon Sep 17 00:00:00 2001 From: Taku Fukada Date: Sat, 25 Jan 2025 04:13:23 +0900 Subject: [PATCH] release workflow --- .github/workflows/release.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 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 0000000..49e4b59 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,31 @@ +name: Release + +on: + push: + tags: + # Publish on any tag starting with a `v`, e.g. v1.2.3 + - v* + +jobs: + pypi: + name: Publish to PyPI + runs-on: ubuntu-latest + # Environment and permissions trusted publishing. + environment: + # Create this environment in the GitHub repository under Settings -> Environments + name: pypi + permissions: + id-token: write + steps: + - uses: actions/checkout@v4 + - uses: astral-sh/setup-uv@v4 + with: + version: "latest" + enable-cache: true + - run: uv build + # Check that basic features work and we didn't miss to include crucial files + - name: Smoke test (wheel) + run: uv run --isolated --no-project -p 3.13 --with dist/*.whl tests/smoke_test.py + # - name: Smoke test (source distribution) + # run: uv run --isolated --no-project -p 3.13 --with dist/*.tar.gz tests/smoke_test.py + - run: uv publish --trusted-publishing always