Skip to content

First commit

First commit #1

Workflow file for this run

name: Release
on:
push:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
FORCE_COLOR: 1
permissions:
contents: write # Needed to upload artifacts to the release
id-token: write # Needed for OIDC PyPI publishing
jobs:
build:
name: Build Wheel and SDist
runs-on: ubuntu-latest
outputs:
name: ${{ steps.baipp.outputs.package_name }}
version: ${{ steps.baipp.outputs.package_version }}
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: hynek/build-and-inspect-python-package@efb823f52190ad02594531168b7a2d5790e66516 # v2.14.0
id: baipp
publish:
name: Publish to PyPI
runs-on: ubuntu-latest
needs: [build]
## TODO: optionally provide the name of the environment for the trusted
## publisher on PyPI
## https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment
# environment:
# name: pypi
# url: https://pypi.org/project/${{ needs.build.outputs.name }}/${{ needs.build.outputs.version }}
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: Packages
path: dist
- name: Publish
## TODO: create a trusted publisher on PyPI
## https://docs.pypi.org/trusted-publishers/
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0