chore: apply suggestions #36
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: Package Publishing | ||
| on: | ||
| release: | ||
| types: [created] | ||
| permissions: | ||
| contents: write | ||
| packages: read | ||
| concurrency: | ||
| group: publishing-${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
| jobs: | ||
| release-build: | ||
| name: Build package | ||
| needs: linting-and-testing | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 30 | ||
| defaults: | ||
| run: | ||
| shell: bash | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
| - uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: "3.12" | ||
| - name: Install Poetry | ||
| uses: snok/install-poetry@v1 | ||
| with: | ||
| version: 'latest' | ||
| virtualenvs-create: true | ||
| virtualenvs-in-project: true | ||
| - name: Build the Package | ||
| run: | | ||
| poetry build | ||
| - name: Upload dists | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: dist | ||
| path: dist | ||
| pypi-publish: | ||
| name: Publish package | ||
| runs-on: ubuntu-latest | ||
| needs: | ||
| - release-build | ||
| permissions: | ||
| id-token: write | ||
| environment: | ||
| name: pypi | ||
| url: https://pypi.org/p/c2pie | ||
| steps: | ||
| - name: Retrieve release distributions | ||
| uses: actions/download-artifact@v5 | ||
| with: | ||
| name: dist | ||
| path: dist | ||
| - name: Publish package distributions to PyPI | ||
| uses: pypa/gh-action-pypi-publish@release/v1 | ||