File tree Expand file tree Collapse file tree 2 files changed +30
-13
lines changed Expand file tree Collapse file tree 2 files changed +30
-13
lines changed Original file line number Diff line number Diff line change 1
1
name : Publish rffickle to PyPI
2
2
3
3
on :
4
- release :
5
- types : [created]
4
+ push :
5
+ tags :
6
+ - " v*"
6
7
workflow_dispatch :
7
8
9
+ permissions :
10
+ contents : read
11
+
8
12
jobs :
9
13
publish :
14
+ name : Publish to PyPI
10
15
runs-on : ubuntu-latest
16
+ environment :
17
+ name : release
18
+ url : https://pypi.org/project/rffickle/
19
+ permissions :
20
+ id-token : write # Required for OIDC/Trusted Publishing
21
+ contents : read
11
22
steps :
12
23
- name : 🛎️ Checkout
13
24
uses : actions/checkout@v4
14
- with :
15
- ref : ${{ github.head_ref }}
16
25
17
26
- name : 🐍 Set up Python
18
27
uses : actions/setup-python@v5
30
39
twine check dist/*
31
40
32
41
- name : 🚀 Publish to PyPI
33
- env :
34
- PYPI_USERNAME : ${{ secrets.PYPI_USERNAME }}
35
- PYPI_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
36
- run : |
37
- twine upload dist/* -u $PYPI_USERNAME -p $PYPI_PASSWORD --verbose
42
+ uses : pypa/gh-action-pypi-publish@release/v1
43
+ with :
44
+ attestations : true
Original file line number Diff line number Diff line change 8
8
- ' setup.py'
9
9
- ' src/**'
10
10
11
+ permissions :
12
+ contents : read
13
+
11
14
jobs :
12
15
publish-test :
16
+ name : Publish to TestPyPI
13
17
runs-on : ubuntu-latest
18
+ environment :
19
+ name : testpypi
20
+ url : https://test.pypi.org/project/rffickle/
21
+ permissions :
22
+ id-token : write # Required for OIDC/Trusted Publishing
23
+ contents : read
14
24
steps :
15
25
- name : 🛎️ Checkout
16
26
uses : actions/checkout@v4
31
41
twine check dist/*
32
42
33
43
- name : 🚀 Publish to TestPyPI
34
- env :
35
- PYPI_TEST_PASSWORD : ${{ secrets.PYPI_TEST_PASSWORD }}
36
- run : |
37
- twine upload --repository testpypi dist/* -u __token__ -p $PYPI_TEST_PASSWORD --verbose
44
+ uses : pypa/gh-action-pypi-publish@release/v1
45
+ with :
46
+ repository-url : https://test.pypi.org/legacy/
47
+ attestations : true
You can’t perform that action at this time.
0 commit comments