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 f0775ac
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -616,3 +616,43 @@ jobs:
- name: Python Test Steps
run: make test TEST_ARGS="-k TestDBReader"
if: ${{ contains( 'sqlalchemy', matrix.package )}}

#############################
#~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#~~~~~~|#############|~~~~~~#
#~~~~~~|#|~~~~~~~~|##|~~~~~~#
#~~~~~~|#|~~~~~~~~|##|~~~~~~#
#~~~~~~|#############|~~~~~~#
#~~~~~~|#|~~~~~~~~|##|~~~~~~#
#~~~~~~|#|~~~~~~~~|##|~~~~~~#
#~~~~~~|#############|~~~~~~#
#~~~~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
with:
name:
merge-multiple: true
path: ./dist

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

- name: Publish version to testpypi
# only publish to testpypi on tag pushes
if: >-
github.reg == 'regs/heads/main' &&
github.event_name != 'pull_request' &&
startsWith(github.ref, 'refs/tags/')
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy

0 comments on commit f0775ac

Please sign in to comment.