Skip to content

Commit edb8b4a

Browse files
authored
chore: Use Trusted Publishing in durabletask.yml
1 parent e2f0470 commit edb8b4a

1 file changed

Lines changed: 8 additions & 13 deletions

File tree

.github/workflows/durabletask.yml

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -90,34 +90,29 @@ jobs:
9090
if: startsWith(github.ref, 'refs/tags/v') # Only run if a matching tag is pushed
9191
needs: run-tests
9292
runs-on: ubuntu-latest
93+
environment: pypi
94+
permissions:
95+
id-token: write
9396
steps:
9497
- name: Checkout code
9598
uses: actions/checkout@v4
9699

97100
- name: Extract version from tag
98-
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV # Extract version from the tag
101+
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
99102

100103
- name: Set up Python
101104
uses: actions/setup-python@v5
102105
with:
103-
python-version: "3.14" # Adjust Python version as needed
106+
python-version: "3.14"
104107

105-
- name: Install dependencies
108+
- name: Install build dependencies
106109
run: |
107110
python -m pip install --upgrade pip
108-
pip install build twine
111+
pip install build
109112
110113
- name: Build package from root directory
111114
run: |
112115
python -m build
113116
114-
- name: Check package
115-
run: |
116-
twine check dist/*
117-
118117
- name: Publish package to PyPI
119-
env:
120-
TWINE_USERNAME: __token__
121-
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} # Store your PyPI API token in GitHub Secrets
122-
run: |
123-
twine upload dist/*
118+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)