Skip to content

Commit

Permalink
Update OIDC workflow configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
maxrjones committed Apr 16, 2024
1 parent 036edb1 commit 999f597
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/pypi-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ on:
types:
- published
# Runs for pull requests should be disabled other than for testing purposes
# pull_request:
# branches:
# - main
pull_request:
branches:
- main

permissions:
contents: read
Expand Down Expand Up @@ -61,6 +61,11 @@ jobs:
test-built-dist:
needs: build-artifacts
runs-on: ubuntu-latest
environment:
name: release
url: https://test.pypi.org/p/cmip6-downscaling
permissions:
id-token: write
steps:
- uses: actions/setup-python@v5.0.0
name: Install Python
Expand All @@ -82,15 +87,18 @@ jobs:
- name: Publish package to TestPyPI
uses: pypa/gh-action-pypi-publish@v1.8.14
with:
password: ${{ secrets.TEST_PYPI_TOKEN }}
repository-url: https://test.pypi.org/legacy/
# verbose: true

upload-to-pypi:
needs: test-built-dist
if: github.event_name == 'release'
runs-on: ubuntu-latest
environment: release
environment:
name: release
url: https://pypi.org/p/cmip6-downscaling
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
Expand Down

0 comments on commit 999f597

Please sign in to comment.