Skip to content

Commit

Permalink
Add a workflow step to automate uploading to testpypi
Browse files Browse the repository at this point in the history
Signed-off-by: Nathan Goldbaum <[email protected]>
  • Loading branch information
ngoldbaum committed Feb 8, 2024
1 parent c011061 commit 7bbd97c
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -616,3 +616,33 @@ jobs:
- name: Python Test Steps
run: make test TEST_ARGS="-k TestDBReader"
if: ${{ contains( 'sqlalchemy', matrix.package )}}

#7#
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#~~~~~~Upload to testpypi~~~~~~~#
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
testpypi_publish:
needs:
- build_sdist
- build

runs-on: ubuntu-22.04
permissions:
id-token: write
steps:
- name: Download wheels and sdist
uses: actions/download-artifact@v4
path: ~/dist
with:
name:
merge-multiple: true

- name: Display structure of downloaded files
run: ls -R dist

- name: Publish version to testpypi
# only actually upload to testpypi on pushes to main
if: github.reg == 'regs/heads/main' && github.event_name != 'pull_request'
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy

0 comments on commit 7bbd97c

Please sign in to comment.