Skip to content

Commit 219dcfe

Browse files
committed
update all my organisation/projects auto publishing script up to 2024
1 parent 0cbf781 commit 219dcfe

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

statics/pythonpublish.yml

+12-7
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,16 @@ on:
55
types: [created]
66

77
jobs:
8-
deploy:
8+
pypi-publish:
9+
name: upload release to PyPI
910
runs-on: ubuntu-latest
11+
# Specifying a GitHub environment is optional, but strongly encouraged
12+
environment: pypi
13+
permissions:
14+
# IMPORTANT: this permission is mandatory for trusted publishing
15+
id-token: write
1016
steps:
17+
# retrieve your distributions here
1118
- uses: actions/checkout@v1
1219
- name: Set up Python
1320
uses: actions/setup-python@v1
@@ -16,11 +23,9 @@ jobs:
1623
- name: Install dependencies
1724
run: |
1825
python -m pip install --upgrade pip
19-
pip install setuptools wheel twine
20-
- name: Build and publish
21-
env:
22-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
23-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
26+
pip install setuptools wheel
27+
- name: Build
2428
run: |
2529
python setup.py sdist bdist_wheel
26-
twine upload dist/*
30+
- name: Publish package distributions to PyPI
31+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)