Repository navigation
55 lines (51 loc) · 2.06 KB
/
Copy pathrelease.yml
File metadata and controls
55 lines (51 loc) · 2.06 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
55
name: Release
# Trigger manually from the develop branch (Actions → Release → Run workflow).
# workflow_dispatch has no branch filter — you pick the ref when you run it.
on:
workflow_dispatch:
# This repo's default GITHUB_TOKEN is read-only; the reusable release workflow needs write
# (bump/merge/tag) + OIDC, and a reusable workflow can't exceed the caller's grant.
permissions:
contents: write
id-token: write
jobs:
release:
uses: ParkerIndustries/workflows/.github/workflows/release.yml@v1
with:
pypi-package-name: majordom-zigbee
python-version: "3.13"
stable-branch: master
# dev-branch: develop
# The QA matrix, in place of the team standard ["3.12", "3.13"]: the SDK needs 3.13.
python-versions: '["3.13"]'
# For compiled/Cython extensions, build a wheel per version (default is one
# pure-Python wheel — leave this off unless you have compiled extensions):
# matrix-build: true
# Setup run before QA checks and before the build (system deps, build_ext, ...),
# and teardown after QA — same hooks as the test workflow:
# setup-script: |
# sudo apt-get update && sudo apt-get install -y espeak-ng
# poetry run python setup.py build_ext --inplace
# post-run-script: docker compose down
# If this project publishes docs, set docs-url to add "New/Updated Documentation"
# sections (linking changed docs/**.md pages) to the release changelog:
# docs-url: https://your-project.example.com
# PyPI publish runs HERE, in the caller — Trusted Publishing can't match a reusable workflow.
publish-pypi:
name: Publish to PyPI
needs: release
runs-on: ubuntu-latest
environment:
name: release
url: https://pypi.org/p/majordom-zigbee
permissions:
id-token: write
steps:
- name: Download distributions
uses: actions/download-artifact@v8
with:
pattern: dist-*
merge-multiple: true
path: dist/
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1