-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (69 loc) · 2.09 KB
/
python-release.yaml
File metadata and controls
75 lines (69 loc) · 2.09 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# This file is @generated by <https://github.com/liblaf/copier-python>.
# DO NOT EDIT!
name: Python / Release
on:
push:
tags:
- "v[0-9]*"
env:
FORCE_COLOR: 1
jobs:
build:
name: Build
permissions:
attestations: write
id-token: write
runs-on: ubuntu-latest
outputs:
artifact-name: ${{ steps.build.outputs.artifact-name }}
package-name: ${{ steps.build.outputs.package_name }}
package-version: ${{ steps.build.outputs.package_version }}
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- id: build
name: Build and inspect a Python package
uses: hynek/build-and-inspect-python-package@fe0a0fb1925ca263d076ca4f2c13e93a6e92a33e # v2
with:
attest-build-provenance-github: true
pypi:
name: Publish to PyPI
permissions:
attestations: write
id-token: write
needs:
- build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/project/${{ needs.build.outputs.package-name }}/${{ needs.build.outputs.package-version }}/
steps:
- name: Download artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
with:
name: ${{ needs.build.outputs.artifact-name }}
path: dist
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # release/v1
with:
verbose: ${{ runner.debug == '1' }}
print-hash: true
attestations: true
github:
name: GitHub Release
permissions:
contents: write
needs:
- build
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
with:
name: ${{ needs.build.outputs.artifact-name }}
path: dist
- name: Upload release assets
uses: softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe # v2
with:
draft: false
files: dist/*