Add release workflow

This commit is contained in:
Demetrius Kanios 2026-06-17 12:03:29 -07:00
parent 62edc5fb94
commit 424c107713
2 changed files with 48 additions and 1 deletions

View File

@ -6,7 +6,8 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Checkout
uses: actions/checkout@v6
with:
submodules: true
- name: Set up Python

46
.github/workflows/release.yml vendored Normal file
View File

@ -0,0 +1,46 @@
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:
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