Skip to content

Commit

Permalink
use OIDC to publish packages (#1298)
Browse files Browse the repository at this point in the history
drop token
  • Loading branch information
njzjz committed Aug 1, 2023
1 parent 801f279 commit 6e74617
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,21 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
release-to-pypi:
uses: deepmodeling/workflows/.github/workflows/release-to-pypi.yml@main
secrets:
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
name: Release to pypi
runs-on: ubuntu-latest
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/checkout@v3
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: 3.x
architecture: x64
- name: Install dependencies
run: python -m pip install build
- run: python -m build
- name: Publish a Python distribution to PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 6e74617

Please sign in to comment.