Skip to content

Commit

Permalink
fix: update release phase to accommodate changes in PSR v8 (#305)
Browse files Browse the repository at this point in the history
  • Loading branch information
browniebroke committed Jul 19, 2023
1 parent f9956a6 commit 5ba411d
Showing 1 changed file with 21 additions and 6 deletions.
27 changes: 21 additions & 6 deletions .github/workflows/ci.yml
Expand Up @@ -68,14 +68,29 @@ jobs:
fetch-depth: 0
ref: ${{ github.head_ref || github.ref_name }}

# Do a dry run of PSR
- name: Test release
uses: relekang/python-semantic-release@v8.0.2
if: github.ref_name != 'main'
with:
root_options: --noop

# On main branch: actual PSR + upload to PyPI & GitHub
- name: Release
uses: relekang/python-semantic-release@v8.0.2
if: github.ref == 'refs/heads/main'
id: release
if: github.ref_name == 'main'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
pypi_token: ${{ secrets.PYPI_TOKEN }}
- name: Test release
uses: relekang/python-semantic-release@v8.0.2
if: github.ref != 'refs/heads/main'

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: steps.release.outputs.released == 'true'
with:
root_options: --noop
password: ${{ secrets.PYPI_TOKEN }}

- name: Publish package distributions to GitHub Releases
uses: python-semantic-release/upload-to-gh-release@main
if: steps.release.outputs.released == 'true'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 5ba411d

Please sign in to comment.