Skip to content

Commit 9eebb34

Browse files
authored
update publish action
1 parent 66b102c commit 9eebb34

File tree

1 file changed

+6
-11
lines changed

1 file changed

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

4-
# This workflow uses actions that are not certified by GitHub.
5-
# They are provided by a third-party and are governed by
6-
# separate terms of service, privacy policy, and support
7-
# documentation.
8-
94
name: publish
105

116
on:
127
release:
13-
types: [published]
8+
branches: [master, main]
9+
types: [released]
1410

1511
jobs:
1612
deploy:
1713

1814
runs-on: ubuntu-latest
15+
permissions:
16+
id-token: write
1917

2018
steps:
2119
- uses: actions/checkout@v2
@@ -26,11 +24,8 @@ jobs:
2624
- name: Install dependencies
2725
run: |
2826
python -m pip install --upgrade pip
29-
pip install build
27+
python -m pip install build
3028
- name: Build package
3129
run: python -m build
3230
- name: Publish package
33-
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
34-
with:
35-
user: __token__
36-
password: ${{ secrets.PYPI_API_TOKEN }}
31+
uses: pypa/[email protected]

0 commit comments

Comments
 (0)