-
Notifications
You must be signed in to change notification settings - Fork 124
43 lines (34 loc) · 1.02 KB
/
release.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
name: Release
# This workflow follows Pypi guidelines for publishing using trusted publishers
# See https://docs.pypi.org/trusted-publishers/using-a-publisher/ for more details.
on:
release:
types: [published]
jobs:
package:
name: Package
uses: ./.github/workflows/package.yml
release:
name: Release
needs: [package]
runs-on: ubuntu-latest
# Make the GH environment explicit
environment: release
permissions:
# Mandatory for attaching assets to releases
contents: write
# Mandatory for trusted publishing
id-token: write
steps:
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
# The assets can be attached to an existing release, if a matching tag is found
- name: Upload release assets
uses: softprops/action-gh-release@v2
with:
files: dist/*.whl
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1