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

chore: fix semantic-release publish #129

Merged
merged 1 commit into from
Oct 15, 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
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 }}
Loading