-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (33 loc) · 1010 Bytes
/
publish.yml
File metadata and controls
39 lines (33 loc) · 1010 Bytes
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
name: publish
# Triggered when a GitHub release is published (by release-please or manually).
# Publishes to PyPI using OIDC Trusted Publisher — no API token needed.
# Before this will succeed, configure a Trusted Publisher on PyPI:
# https://docs.pypi.org/trusted-publishers/adding-a-trusted-publisher/
on:
release:
types: [published]
workflow_dispatch:
inputs:
tag:
description: "Tag to publish (e.g. v1.2.3)"
required: true
jobs:
publish-pypi:
name: 📦 publish to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/project/dispatchio/
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.release.tag_name || github.event.inputs.tag }}
- uses: jdx/mise-action@v3
with:
cache: true
- name: Build package
run: uv build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1