-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (46 loc) · 1.27 KB
/
python-publish.yml
File metadata and controls
54 lines (46 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Build, Release & publish
on:
push:
tags:
- "pypi/*"
workflow_dispatch:
inputs:
ref:
description: "Git ref to publish (e.g. pypi/5.1.5)"
required: true
default: "pypi/5.1.5"
permissions:
contents: write
id-token: write
jobs:
build-release-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ inputs.ref || github.ref_name }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Build sdist + wheel
run: |
python -m pip install -U pip uv
uv build
- name: Extract version
id: vars
run: |
REF="${{ inputs.ref || github.ref_name }}"
VERSION="$REF"
VERSION="${VERSION#pypi/}"
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ inputs.ref || github.ref_name }}
name: "debmake ${{ steps.vars.outputs.version }} (unofficial)"
files: dist/*
generate_release_notes: true
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1