Skip to content

Commit

Permalink
feat(ci): add GitHub workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
mriesen committed Oct 18, 2024
1 parent 8ba8641 commit 09ac57e
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Publish Python Package

on:
release:
types: [published]

permissions:
contents: read

jobs:
deploy:
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install hatch
- name: Build package
run: hatch build
- name: Test package
run: hatch run types:check
- name: Publish package
run: hatch publish
19 changes: 19 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Test Python Package

on: [push]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install hatch
- name: Run type checks
run: hatch run types:check

0 comments on commit 09ac57e

Please sign in to comment.