Some checks failed
Build and Publish Docker Image / build (pull_request) Failing after 54s
68 lines
1.9 KiB
YAML
68 lines
1.9 KiB
YAML
name: Create Release
|
|
|
|
# This workflow creates releases:
|
|
# 1. Build packages
|
|
# 2. Create Gitea release with all artifacts atomically
|
|
# This ensures releases cannot be modified once published.
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
workflow_dispatch:
|
|
inputs:
|
|
version:
|
|
description: 'Version to release (e.g., 0.6.8)'
|
|
required: true
|
|
type: string
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
build:
|
|
name: Build distribution 📦
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
steps:
|
|
- name: Checkout
|
|
uses: https://git.quad4.io/actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
|
|
with:
|
|
persist-credentials: false
|
|
- name: Set up Python
|
|
uses: https://git.quad4.io/actions/setup-python@83679a892e2d95755f2dac6acb0bfd1e9ac5d548 # v5
|
|
with:
|
|
python-version: "3.13"
|
|
- name: Install pypa/build
|
|
run: python3 -m pip install build --user
|
|
- name: Build a binary wheel and a source tarball
|
|
run: python3 -m build
|
|
- name: Store the distribution packages
|
|
uses: https://git.quad4.io/actions/upload-artifact@8689daa8608e46baf41e4786cb83fbc0dea972cd # v4
|
|
with:
|
|
name: python-package-distributions
|
|
path: dist/
|
|
|
|
gitea-release:
|
|
name: Create Gitea Release
|
|
needs:
|
|
- build
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
|
|
steps:
|
|
- name: Download all the dists
|
|
uses: https://git.quad4.io/actions/download-artifact@10979da4ee3096dd7ca8d9a35c72871335fee704 # v5
|
|
with:
|
|
name: python-package-distributions
|
|
path: dist/
|
|
- name: Create Gitea Release with artifacts
|
|
uses: https://git.quad4.io/actions/gitea-release-action@4875285c0950474efb7ca2df55233c51333eeb74
|
|
with:
|
|
tag_name: ${{ github.ref_name }}
|
|
name: Release ${{ github.ref_name }}
|
|
files: |
|
|
dist/*.tar.gz
|
|
dist/*.whl |