Skip to content

Commit

Permalink
chore: fix semantic-release publish (#129)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamagalhaes authored Oct 15, 2024
1 parent 7524851 commit 8a24339
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions .github/workflows/publish-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,15 @@ name: Semantic Release
on:
workflow_dispatch:
inputs:
publish-pypi:
description: 'Publish to PyPI'
required: false
default: 'true'
type: boolean
dry-run:
description: 'Dry run'
required: false
default: 'false'
type: boolean

permissions:
id-token: write

jobs:
build-and-test:
uses: ./.github/workflows/build-and-test.yml
Expand Down Expand Up @@ -45,11 +43,10 @@ jobs:
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: inputs.publish-pypi == 'true' && inputs.dry-run == 'false'
if: ${{ !inputs.dry-run }}

- name: Publish package distributions to GitHub Releases
uses: python-semantic-release/upload-to-gh-release@main
if: inputs.dry-run == 'false'
with:
github_token: ${{ secrets.PROJECT_AND_REPO_PAT }}
tag: ${{ steps.release.outputs.tag }}
GH_TOKEN: ${{ secrets.PROJECT_AND_REPO_PAT }}
run: |
poetry run semantic-release --strict -vv $([ "${{ inputs.dry-run }}" == "true" ] && echo "--noop") publish --tag ${{ steps.release.outputs.tag }}

0 comments on commit 8a24339

Please sign in to comment.