Skip to content

Commit

Permalink
Add release GitHub Action (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
cbrnr authored Jul 17, 2024
1 parent 09ace34 commit aadd062
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Release

on:
release:
types: [published]

jobs:
style:
name: Check style
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: chartboost/ruff-action@v1
- uses: chartboost/ruff-action@v1
with:
args: 'format --check'

build:
needs: style
name: Build package
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Build sdist and wheel
run: |
pip install build
python -m build
- uses: actions/upload-artifact@v4
with:
name: dist
path: dist

upload-pypi:
name: Upload to PyPI
needs: build
runs-on: ubuntu-22.04
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
name: dist
path: dist
- uses: pypa/[email protected]

0 comments on commit aadd062

Please sign in to comment.