Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: create release/tag on release: commit #13

Merged
merged 1 commit into from
Nov 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ on:
push:
branches:
- main
tags:
- v*.*.*

concurrency:
group: ci-${{ github.ref }}
Expand Down Expand Up @@ -57,7 +55,7 @@ jobs:
runs-on: ubuntu-latest
needs: test
environment: release
if: startsWith(github.ref, 'refs/tags/v')
if: github.ref_name == 'main' && startsWith(github.event.head_commit.message, 'release:')
permissions:
attestations: write
contents: write
Expand All @@ -72,11 +70,13 @@ jobs:
key: venv-${{ hashFiles('poetry.lock') }}
- run: poetry install
- run: poetry build
- run: echo "version=$(poetry version --short)" >> $GITHUB_OUTPUT
id: version
- uses: actions/attest-build-provenance@v1
with:
subject-path: dist/*
- uses: pypa/gh-action-pypi-publish@release/v1
- run: gh release create ${{ github.ref_name }} --generate-notes dist/*
- run: gh release create ${{ steps.version.outputs.version }} --generate-notes dist/*
env:
GH_TOKEN: ${{ github.token }}
- uses: actions/upload-artifact@v4
Expand Down