46 lines
953 B
YAML
46 lines
953 B
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
uses: ./.github/workflows/build.yml
|
|
permissions:
|
|
contents: read
|
|
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
permissions:
|
|
contents: write
|
|
id-token: write
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up uv
|
|
uses: astral-sh/setup-uv@v3
|
|
|
|
- name: Download build artifacts
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: dist-packages
|
|
path: dist/
|
|
|
|
- name: Create GitHub Release
|
|
uses: softprops/action-gh-release@v2
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
with:
|
|
files: dist/*
|
|
generate_release_notes: true
|
|
|
|
- name: Publish to PyPI
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
uses: pypa/gh-action-pypi-publish@release/v1
|
|
with:
|
|
skip-existing: true
|