v7.4.2 #27
Workflow file for this run
This file contains hidden or 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
| name: Release to PyPI | |
| on: | |
| release: | |
| types: [prereleased, released] | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write # softprops/action-gh-release | |
| id-token: write # pypa/gh-action-pypi-publish | |
| issues: write # apexskier/github-release-commenter | |
| pull-requests: write # apexskier/github-release-commenter | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 # fetch git tags for setuptools_scm (smart_open.__version__) | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: 3.x | |
| - name: Install dependencies | |
| run: | | |
| pip install --upgrade pip setuptools wheel build | |
| - name: Build package distributions | |
| run: | | |
| python -m build | |
| - name: Upload package distributions as release assets | |
| uses: softprops/[email protected] | |
| with: | |
| files: dist/* | |
| # https://github.com/pypa/gh-action-pypi-publish#trusted-publishing | |
| - name: Publish package distributions to PyPI | |
| uses: pypa/[email protected] | |
| - uses: apexskier/[email protected] | |
| with: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| comment-template: | | |
| Released {release_link} |