-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (37 loc) · 1.12 KB
/
pypi.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
name: Create PyPi release
on:
push:
branches:
- main
tags:
- '*'
release:
types:
- created
jobs:
wheel:
runs-on: ubuntu-latest
permissions:
contents: write # needed to create/update the release from the tag
id-token: write # needed to allow trusted PyPi publishing
environment:
name: pypi
url: https://pypi.org/p/cinder-rxt
steps:
# grab the code
- uses: actions/checkout@v4
# install what's needed to build the wheel and src dist
- run: pip install wheel build
# actually build it
- run: pyproject-build
# publish tags as releases
- name: Publish package distributions to PyPI
if: startsWith(github.ref, 'refs/tags/')
uses: pypa/gh-action-pypi-publish@release/v1
# create/update GitHub releases based on tags
- uses: ncipollo/release-action@v1
if: startsWith(github.ref, 'refs/tags/')
with:
allowUpdates: true # allow users to create a release on the web page to trigger
artifacts: "dist/*.whl,dist/*.gz"
generateReleaseNotes: true