Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
workflow_call:

jobs:
test:
Expand Down Expand Up @@ -57,7 +58,7 @@ jobs:

integration-test:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
if: github.event_name == 'pull_request' || github.event_name == 'workflow_call'

steps:
- uses: actions/checkout@v4
Expand Down
52 changes: 34 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,47 @@
name: Release

on:
release:
types: [created]
workflow_dispatch:
inputs:
level:
description: 'Version level to bump'
required: true
default: 'patch'
type: choice
options:
- patch
- minor
- major

jobs:
deploy:
runs-on: ubuntu-latest
ci:
uses: ./.github/workflows/ci.yml
secrets: inherit

release:
runs-on: ubuntu-latest
needs: ci
concurrency: release
permissions:
id-token: write
contents: write

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Install Pixi
uses: prefix-dev/setup-pixi@v0.8.1
with:
pixi-version: v0.29.0

- name: Build package
run: python -m build
- name: Semantic Release
run: pixi run python -m semantic_release version --${{ inputs.level }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: twine upload dist/*
uses: pypa/gh-action-pypi-publish@release/v1
if: github.ref == 'refs/heads/main'
Loading