Skip to content

Commit

Permalink
allow for test to install packages from test PyPI first
Browse files Browse the repository at this point in the history
  • Loading branch information
mikealfare committed Oct 11, 2024
1 parent e9dd6b4 commit 1120af5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
deploy-to:
description: "Choose whether to publish to test or prod"
type: string
default: "prod"
default: "test"
branch:
description: "Choose the branch to publish"
type: string
Expand Down Expand Up @@ -46,9 +46,11 @@ jobs:
with:
python-version: ${{ vars.DEFAULT_PYTHON_VERSION }}
- uses: pypa/hatch@install
# hatch will build using test PyPI first and fall back to prod PyPI when deploying to test
# this is done via environment variables in the test environment in GitHub
- run: hatch build && hatch run build:check-all
working-directory: ./${{ inputs.package }}
- uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: ${{ vars.vars.PYPI_REPOSITORY_URL }}
repository-url: ${{ vars.PYPI_REPOSITORY_URL }}
packages-dir: ${{ inputs.package }}/dist/
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
deploy-to:
description: "Choose whether to deploy to test or prod"
type: environment
default: "prod"
default: "test"
branch:
description: "Choose the branch to release from"
type: string
Expand Down

0 comments on commit 1120af5

Please sign in to comment.