Skip to content

Commit

Permalink
Use trusted OIDC publish workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
ktlim committed Mar 14, 2024
1 parent 7cffac3 commit 8d36966
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,13 @@ jobs:
pypi:
runs-on: ubuntu-latest
needs: [build_and_test]
if: startsWith(github.ref, 'refs/tags/')
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
environment:
name: pypi
url: https://pypi.org/p/lsst-s3daemon
permissions:
id-token: write


steps:
- uses: actions/checkout@v4
Expand All @@ -60,15 +66,12 @@ jobs:

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade setuptools wheel build
pip install uv
uv pip install --upgrade setuptools wheel build
- name: Build and create distribution
run: |
python -m build --skip-dependency-check
- name: Upload
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_UPLOADS }}

0 comments on commit 8d36966

Please sign in to comment.