diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..f9cc89e --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,25 @@ +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 + - 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: ${{ !cancelled() }} + run: pdm publish --no-build