Skip to content

Commit

Permalink
ci: pass release tag to test action
Browse files Browse the repository at this point in the history
  • Loading branch information
atomiechen committed Dec 17, 2024
1 parent 3a42f7b commit e74bbec
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/publish-to-testpypi-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ on:
jobs:
test:
uses: ./.github/workflows/test.yml
with:
release_tag: ${{ inputs.release_tag }}
build-n-publish:
needs: test
uses: atomiechen/reusable-workflows/.github/workflows/publish-python-distributions.yml@main
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
pull_request:
branches: [ "main" ]
workflow_call:
inputs:
release_tag:
type: string
required: false

jobs:
build:
Expand All @@ -15,6 +19,12 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Checkout to release tag if provided
if: ${{ inputs.release_tag }}
run: |
echo "Checking out to release tag ${{ inputs.release_tag }}"
git fetch --prune --unshallow --tags
git checkout ${{ inputs.release_tag }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
Expand Down

0 comments on commit e74bbec

Please sign in to comment.