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 12, 2024
1 parent c10666a commit a96125f
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -613,3 +613,44 @@ 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.ref == '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 a96125f

Please sign in to comment.