Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trusted publishing #975

Merged
merged 1 commit into from
Aug 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ jobs:
name: artifact
path: dist/*
test:
permissions:
id-token: write
name: upload to test PyPI
needs: [build]
runs-on: ubuntu-latest
Expand All @@ -57,8 +59,6 @@ jobs:
- uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository-url: https://test.pypi.org/legacy/
- uses: actions/setup-python@v4
with:
Expand All @@ -71,6 +71,9 @@ jobs:
venv-test-pypi/bin/python -c "import pymc_marketing; assert pymc_marketing.__version__ == '${{ github.ref_name }}'"

publish:
environment: release
permissions:
id-token: write
name: upload release to PyPI
needs: [build, test]
runs-on: ubuntu-latest
Expand All @@ -81,6 +84,3 @@ jobs:
name: artifact
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
Loading