Skip to content

ci: add build workflow #4

ci: add build workflow

ci: add build workflow #4

Workflow file for this run

name: Build
on: push
jobs:
build:
runs-on: ubuntu-latest
environment: release
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v4
- uses: pdm-project/setup-pdm@v3
- name: Build
run: pdm build
- uses: actions/upload-artifact@v4
with:
name: dist
path: dist
if-no-files-found: error
- name: Release
uses: softprops/action-gh-release@v2
if: startswith(github.ref, 'refs/tags/v')
with:
files: dist/*
generate_release_notes: true
- name: Publish to PyPI
if: startswith(github.ref, 'refs/tags/v')
run: pdm publish --no-build