build: WIP GitHub workflows #1
This file contains 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: Build and publish to Test PyPI | |
on: | |
push: | |
branches-ignore: | |
- main | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- synchronize | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Reuse build job | |
uses: ./github/workflows/templates/build.yml | |
publish-to-test-pypi: | |
runs-on: ubuntu-latest | |
# Specifying a GitHub environment is optional, but strongly encouraged | |
environment: development | |
permissions: | |
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | |
steps: | |
- name: Publish distribution 📦 to Test PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
repository-url: https://test.pypi.org/legacy/ | |
sign-artifacts: true | |
skip-existing: true |