-
Notifications
You must be signed in to change notification settings - Fork 3
42 lines (37 loc) · 1.19 KB
/
release.yml
File metadata and controls
42 lines (37 loc) · 1.19 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
name: "Release"
on:
workflow_dispatch: # manually triggered
env:
# Many color libraries just need this to be set to any value, but at least
# one distinguishes color depth, where "3" -> "256-bit color".
FORCE_COLOR: 3
jobs:
# https://docs.pypi.org/trusted-publishers/using-a-publisher/
release:
needs: []
name: Distribution build and publish to PyPI
runs-on: ubuntu-latest
permissions:
id-token: write
attestations: write
contents: write
environment:
name: pypi
url: https://pypi.org/p/e3sm-quickview
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Python Semantic Release
id: release
uses: python-semantic-release/python-semantic-release@v10.4.1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Generate artifact attestation for sdist and wheel
if: steps.release.outputs.released == 'true'
uses: actions/attest-build-provenance@v2.2.3
with:
subject-path: "dist/*"
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: steps.release.outputs.released == 'true'