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

Use python trusted publishers #194

Merged
merged 1 commit into from
Mar 14, 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
19 changes: 0 additions & 19 deletions .github/workflows/publish.yml → .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,22 +79,6 @@ jobs:
name: Build and publish Python 🐍 distributions 📦 to TestPyPI and PyPI
runs-on: ubuntu-latest
steps:
- name: Authenticate to AWS
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-east-1
role-to-assume: arn:aws:iam::403483446840:role/autogen_role_beta_github_actions_release_asana_client_libraries
- name: Load secrets
uses: aws-actions/aws-secretsmanager-get-secrets@v1
with:
secret-ids: |
PYPI_API,prod/github_actions_release_asana_client_libraries/pypi_api_token
TEST_PYPI_API,prod/github_actions_release_asana_client_libraries/test_pypi_api_token
# pypi_api_token secret is stored as {token:"***..."}.
# GitHub Actions environment variable name is PYPI_API so to access "token" from the json we can use PYPI_API_TOKEN
# test_pypi_api_token secret is stored as {token:"***..."}.
# GitHub Actions environment variable name is TEST_PYPI_API so to access "token" from the json we can use TEST_PYPI_API_TOKEN
parse-json-secrets: true
- uses: actions/checkout@v4
with:
fetch-depth: 0
Expand All @@ -120,12 +104,9 @@ jobs:
- name: Publish distribution 📦 to Test PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ env.TEST_PYPI_API_TOKEN }}
repository-url: https://test.pypi.org/legacy/
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ env.PYPI_API_TOKEN }}
publish-to-github-releases:
needs: publish-to-pypi
name: Publish to GitHub Releases
Expand Down