-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
20 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 }} | ||
|
||
|