Skip to content

Commit

Permalink
fix: release process (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco authored Dec 29, 2023
1 parent c9b72d6 commit 3cb2118
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,25 +62,39 @@ jobs:
release:
runs-on: ubuntu-latest
environment: release
if: github.ref == 'refs/heads/main'
concurrency: release
permissions:
id-token: write
contents: write
needs:
- test
- lint
- commitlint

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

# Run semantic release:
# - Update CHANGELOG.md
# - Update version in code
# - Create git tag
# - Create GitHub release
# - Publish to PyPI
- name: Python Semantic Release
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.head_ref || github.ref_name }}

# Do a dry run of PSR
- name: Test release
uses: python-semantic-release/[email protected]
if: github.ref_name != 'main'
with:
root_options: --noop

# On main branch: actual PSR + upload to PyPI & GitHub
- name: Release
uses: python-semantic-release/[email protected]
id: release
if: github.ref_name == 'main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

Expand Down

0 comments on commit 3cb2118

Please sign in to comment.