Skip to content

Commit 43bbdc1

Browse files
Merge pull request #219 from HubSpot/atanasiuk-hubspot-patch-1
Update publish action to support Trusted Publisher
2 parents 572a47c + 0892367 commit 43bbdc1

File tree

1 file changed

+14
-18
lines changed

1 file changed

+14
-18
lines changed

Diff for: .github/workflows/pythonpublish.yml

+14-18
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,19 @@ on:
99

1010
jobs:
1111
deploy:
12-
1312
runs-on: ubuntu-latest
14-
13+
permissions:
14+
id-token: write
1515
steps:
16-
- uses: actions/checkout@v2
17-
- name: Set up Python
18-
uses: actions/setup-python@v1
19-
with:
20-
python-version: '3.x'
21-
- name: Install dependencies
22-
run: |
23-
python -m pip install --upgrade pip
24-
pip install setuptools wheel twine
25-
- name: Build and publish
26-
env:
27-
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
28-
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
29-
run: |
30-
python setup.py sdist bdist_wheel
31-
twine upload dist/*
16+
- uses: actions/checkout@v2
17+
- name: Set up Python
18+
uses: actions/setup-python@v1
19+
with:
20+
python-version: '3.x'
21+
- name: Build
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install setuptools wheel twine
25+
python setup.py sdist bdist_wheel
26+
- name: Publish
27+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)