-
Notifications
You must be signed in to change notification settings - Fork 3
63 lines (47 loc) · 1.42 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Upload Python Package
on:
workflow_dispatch:
push:
tags:
- v*.*.*
permissions:
contents: read
jobs:
pypi-publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build and publish
uses: JRubics/[email protected]
with:
pypi_token: ${{ secrets.PYPI_TOKEN }}
# # Specifying a GitHub environment is optional, but strongly encouraged
# environment: release
# permissions:
# # IMPORTANT: this permission is mandatory for trusted publishing
# id-token: write
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# - name: Setup Python
# uses: actions/setup-python@v4
# with:
# python-version: "3.x"
# - name: Build distribution
# uses: |
# python3 -m pip install -U pip
# python3 -m pip install -U build --user
# python3 -m build
# - name: Store the distribution packages
# uses: actions/upload-artifact@v3
# with:
# name: python-package-distributions
# path: dist/
# - name: Download distribution packages
# uses: actions/download-artifact@v3
# with:
# name: python-package-distributions
# path: dist/
# - name: Publish package distributions to PyPI
# uses: pypa/gh-action-pypi-publish@release/v1