Skip to content

Commit 2e20788

Browse files
committed
Update publish.yml
1 parent 7afcab5 commit 2e20788

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

.github/workflows/publish.yml

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
# This workflows will upload a Python Package using Twine when a release is created
2-
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
1+
# This workflows will upload a Python Package when a release is created
32

43
name: Publish Python Package
54

@@ -8,12 +7,18 @@ on:
87
types: [ created ]
98

109
jobs:
11-
deploy:
10+
publish:
1211

1312
runs-on: ubuntu-latest
14-
13+
environment:
14+
name: pypi
15+
url: https://pypi.org/p/forecastmanager
16+
permissions:
17+
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
1518
steps:
16-
- uses: actions/checkout@v2
19+
- name: Checkout
20+
uses: actions/checkout@v2
21+
1722
- name: Set up Python
1823
uses: actions/setup-python@v1
1924
with:
@@ -22,13 +27,10 @@ jobs:
2227
- name: Install dependencies
2328
run: |
2429
python -m pip install --upgrade pip
25-
pip install build twine
30+
pip install build
2631
2732
- name: Build package
2833
run: python -m build
2934

30-
- name: Build and publish to PyPI
31-
env:
32-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
33-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
34-
run: twine upload dist/*
35+
- name: Publish package distributions to PyPI
36+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)