Skip to content
Merged
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
54 changes: 54 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Publish

on:
release:
types: [published]

env:
UV_VERSION: '0.8.15'

permissions:
contents: write
id-token: write

defaults:
run:
shell: bash

jobs:
publish:
runs-on: ubuntu-22.04
environment:
name: pypi
url: https://pypi.org/p/dynopsi
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: main
token: ${{ secrets.PUBLISH_PAT }}

- name: Setup uv
uses: astral-sh/setup-uv@v6
with:
version: ${{ env.UV_VERSION }}

- name: Set version from release tag
run: |
VERSION="${{ github.event.release.tag_name }}"
VERSION="${VERSION#v}"
uv version "$VERSION"

- name: Commit version bump
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add pyproject.toml
git commit -m "chore: bump version to ${{ github.event.release.tag_name }}"
git push origin main

- name: Build
run: uv build

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
Loading