ci: add configuration for building and publishing the package #1
Workflow file for this run
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
on: | |
pull_request: | |
branches: [ "main" ] | |
merge_group: | |
types: [ checks_requested ] | |
workflow_dispatch: | |
release: | |
types: | |
- published | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Build SDist & wheel | |
run: pipx run build | |
- uses: actions/upload-artifact@v4 | |
with: | |
path: dist/* | |
check: | |
needs: [build] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
name: artifact | |
path: dist | |
- name: validate SDist & wheel | |
run: pipx run twine check dist/* |