Skip to content

Commit

Permalink
ci: Working TestPyPI deployment.
Browse files Browse the repository at this point in the history
Runs after tests in the release branch pass.
  • Loading branch information
b-butler committed Jan 17, 2024
1 parent 5dcfb1a commit 4483482
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/deploy-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ concurrency:

jobs:
build-test-publish-to-pypi:
environment: release
permissions:
id-token: write
uses: ./.github/workflows/publish-packages.yml
with:
upload_to_test: false
11 changes: 5 additions & 6 deletions .github/workflows/deploy-test-pypi.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
name: Publish to TestPyPI

on:
push:
branches:
- 'release/*.*.*'
workflow_run:
workflows: ["Run Unit Tests"]
branches: ['release/*.*.*']
types: ["completed"]

concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true

jobs:
build-test-publish-to-testpypi:
environment: release
permissions:
id-token: write
if: ${{ github.event.workflow_run.conclusion == 'success' }}
uses: ./.github/workflows/publish-packages.yml
with:
upload_to_test: true
5 changes: 4 additions & 1 deletion .github/workflows/publish-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
jobs:
build:
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
steps:
- name: Check out repo
uses: actions/checkout@v3
Expand Down Expand Up @@ -44,7 +47,7 @@ jobs:
if: ${{ inputs.upload_to_test }}
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository_url: https://test.pypi.org/legacy/
repository-url: https://test.pypi.org/legacy/

- name: Publish package to PyPI
if: ${{ !inputs.upload_to_test }}
Expand Down

0 comments on commit 4483482

Please sign in to comment.