From e79c9cc046809929a1435d5d8559eb7d2c88022c Mon Sep 17 00:00:00 2001 From: mschoi Date: Mon, 26 Oct 2026 18:43:32 +0900 Subject: [PATCH] ci(release): tag-triggered PyPI publish via Trusted Publishing (bs-autobot) --- .github/workflows/release.yml | 44 +++++++++++++++++++++++++++++++++++ 1 file changed, 44 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..a83cc9d --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,44 @@ +name: Release + +# Tag-triggered: build the bs-autobot wheel and publish to PyPI via Trusted +# Publishing (OIDC). First-time setup on pypi.org (maintainer action): +# Pending Publisher: repo BitterSecurity/AutoBot, workflow release.yml, +# environment pypi-release — then the publish job is authorized. +on: + push: + tags: ["v*"] + +permissions: + contents: write + +jobs: + publish-pypi: + name: Publish bs-autobot wheel to PyPI + runs-on: ubuntu-latest + environment: pypi-release + permissions: + id-token: write + contents: read + steps: + - uses: actions/checkout@v4 + - uses: astral-sh/setup-uv@v5 + - run: uv build --package autobot + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + + github-release: + name: GitHub Release + needs: publish-pypi + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/checkout@v4 + - name: Extract release notes from the tag annotation + run: | + git tag -l --format='%(contents)' "${GITHUB_REF#refs/tags/}" > RELEASE_NOTES.md + - name: Create GitHub Release + uses: softprops/action-gh-release@v2 + with: + body_path: RELEASE_NOTES.md + draft: false