Skip to content
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
10 changes: 8 additions & 2 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
build-and-publish:
name: Build and publish Python package to PyPI
runs-on: ubuntu-latest
# NOTE: You should create a "pypi-publish" environment in GitHub repo settings
# NOTE: You should create an environment in GitHub repo settings
Copy link

Copilot AI May 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Consider clarifying the comment by specifying the expected environment name (e.g., 'pypi') to guide users in setting up the correct GitHub environment for PyPI publishing.

Copilot uses AI. Check for mistakes.
# and configure it to match what you set up in PyPI trusted publishing
# Uncomment the following line once your environment is set up in GitHub:
# environment: pypi-publish
environment: pypi
permissions:
id-token: write # Required for trusted publishing (OIDC)
contents: read # To checkout the repository
Expand All @@ -33,8 +33,14 @@ jobs:
python -m pip install --upgrade pip
python -m pip install build twine

- name: Extract version from tag
id: get_version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT

- name: Build package
working-directory: ./pysmq
env:
SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PYSMQ: ${{ steps.get_version.outputs.VERSION }}
run: python -m build

- name: Publish package to PyPI
Expand Down
Loading