Skip to content

Commit 52cc022

Browse files
authored
use OIDC to publish packages (#36)
1 parent 5a2e6a6 commit 52cc022

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

.github/workflows/release.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,23 @@ on: [push, pull_request]
22
name: Release to pypi
33
jobs:
44
release-to-pypi:
5-
uses: deepmodeling/workflows/.github/workflows/release-to-pypi.yml@main
6-
secrets:
7-
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
5+
name: Release to pypi
6+
runs-on: ubuntu-latest
7+
permissions:
8+
# IMPORTANT: this permission is mandatory for trusted publishing
9+
id-token: write
10+
steps:
11+
- uses: actions/checkout@v3
12+
- name: Setup python
13+
uses: actions/setup-python@v4
14+
with:
15+
python-version: 3.x
16+
architecture: x64
17+
- name: Install dependencies
18+
run: python -m pip install build
19+
- run: python -m build
20+
- name: Publish a Python distribution to PyPI
21+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
22+
uses: pypa/gh-action-pypi-publish@release/v1
23+
with:
24+
verbose: true

0 commit comments

Comments
 (0)