Skip to content

Commit

Permalink
Merge pull request #194 from Asana/use-pypi-trusted-publishers
Browse files Browse the repository at this point in the history
Use python trusted publishers
  • Loading branch information
jv-asana authored Mar 14, 2024
2 parents 500f82d + 6079f30 commit db97f2c
Showing 1 changed file with 0 additions and 19 deletions.
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

0 comments on commit db97f2c

Please sign in to comment.