Skip to content

Commit

Permalink
ci: add build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jaxvanyang committed Jun 8, 2024
1 parent 9496f77 commit 7abd2dc
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
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

0 comments on commit 7abd2dc

Please sign in to comment.