-
-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (34 loc) · 1.12 KB
/
Copy pathrelease.yml
File metadata and controls
39 lines (34 loc) · 1.12 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
name: Release to PyPI
on:
push:
tags:
- "v*"
permissions:
contents: read
jobs:
# Checks and build via the shared reusable workflow, which uploads
# the built distributions as a "dist" artifact.
py-checks:
uses: chatmail/workflows/.github/workflows/py-checks.yml@main
# The publish job must stay here in the repo's own workflow: PyPI
# trusted publishing rejects publishes from reusable workflows.
# See https://github.com/pypi/warehouse/issues/11096
publish:
needs: py-checks
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v8
with:
name: dist
path: dist/
# This job may publish to PyPI in our name, so the action is
# pinned to an immutable commit. "@release/v1" is a branch:
# it would run whatever it points at on the day.
- uses: pypa/gh-action-pypi-publish@ba38be9e461d3875417946c167d0b5f3d385a247 # v1.14.1
with:
# Fail loudly instead of skipping silently when the
# version was already published.
skip-existing: false