-
Notifications
You must be signed in to change notification settings - Fork 10
48 lines (44 loc) · 1.2 KB
/
release_publish.yml
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
name: "Release: Publish"
run-name: "Release: ${{ github.event.head_commit.message }}"
on:
push:
branches:
- mainline
paths:
- CHANGELOG.md
concurrency:
group: release
jobs:
Publish:
name: Publish Release
permissions:
id-token: write
contents: write
uses: OpenJobDescription/.github/.github/workflows/reusable_publish.yml@mainline
secrets: inherit
# PyPI does not support reusable workflows yet
# # See https://github.com/pypi/warehouse/issues/11096
PublishToPyPI:
needs: Publish
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: release
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install dependencies
run: |
pip install --upgrade hatch
- name: Build
run: hatch -v build
# # See https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-pypi
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1