Skip to content

Commit

Permalink
Update publish job with pypi api tokens (#262)
Browse files Browse the repository at this point in the history
## Problem

Now that PyPI has required 2FA for all accounts, we have to publish
using API Tokens instead of username and password.

## Solution

- Update workflows with pypi api token.
- Delete unused jobs that publish to testpypi

## Type of Change

- [x] Infrastructure change (CI configs, etc)

## Test Plan

Describe specific steps for validating this change.
  • Loading branch information
jhamon authored Dec 28, 2023
1 parent 2a26369 commit e53ea92
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 127 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/alpha-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ jobs:
prereleaseSuffix: ${{ inputs.prereleaseSuffix }}
TWINE_REPOSITORY: 'pypi'
secrets:
PYPI_USERNAME: ${{ secrets.PROD_PYPI_USERNAME }}
PYPI_PASSWORD: ${{ secrets.PROD_PYPI_PASSWORD }}
PYPI_USERNAME: __token__
PYPI_PASSWORD: ${{ secrets.PROD_PYPI_PUBLISH_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/nightly-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,6 @@ jobs:
id: pypi_upload
env:
TWINE_REPOSITORY: pypi
PYPI_USERNAME: ${{ secrets.PROD_PYPI_USERNAME }}
PYPI_PASSWORD: ${{ secrets.PROD_PYPI_PASSWORD }}
PYPI_USERNAME: __token__
PYPI_PASSWORD: ${{ secrets.PROD_PYPI_PUBLISH_TOKEN }}
run: make upload
65 changes: 0 additions & 65 deletions .github/workflows/nightly-spruce-dev-release.yaml

This file was deleted.

52 changes: 0 additions & 52 deletions .github/workflows/release-spruce.yaml

This file was deleted.

8 changes: 2 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ on:
- 'minor' # new features, backwards compatible
- 'major' # breaking changes

env:
PYPI_USERNAME: ${{ secrets.TEST_PYPI_USERNAME }}
PYPI_PASSWORD: ${{ secrets.TEST_PYPI_PASSWORD }}

jobs:
testing:
uses: './.github/workflows/testing.yaml'
Expand All @@ -37,5 +33,5 @@ jobs:
TWINE_REPOSITORY: 'pypi'
prereleaseSuffix: ''
secrets:
PYPI_USERNAME: ${{ secrets.PROD_PYPI_USERNAME }}
PYPI_PASSWORD: ${{ secrets.PROD_PYPI_PASSWORD }}
PYPI_USERNAME: __token__
PYPI_PASSWORD: ${{ secrets.PROD_PYPI_PUBLISH_TOKEN }}

0 comments on commit e53ea92

Please sign in to comment.