pumpkin-api-py/.github/workflows/release.yml
2026-07-06 11:13:22 -07:00

48 lines
1022 B
YAML

name: Release
on:
push:
tags:
- "v*"
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
release:
name: Build and release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
submodules: true
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install `build` from pip
run: pip install build
- name: Build
run: python -m build
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: python-dist
path: dist/pumpkin_api_py*
- name: Upload artifacts to release
if: startsWith(github.ref, 'refs/tags/v')
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
file: dist/pumpkin_api_py*
overwrite: true
file_glob: true