Skip to content

Commit

Permalink
ci(pypi): track Upstream 'release', before checking if ref pushed is …
Browse files Browse the repository at this point in the history
…a tag on release
  • Loading branch information
boromir674 committed Jan 29, 2024
1 parent b397edb commit 4f3f57a
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -238,20 +238,25 @@ jobs:
# - PyPI Job Switch is ON
# - Workflow Event is a 'v*' Tag (e.g. v1.0.0, v-test)
# - Tag is tagging a commit on either the 'master' or 'release' Branch
env:
RELEASE_BR: 'release'
MAIN_BR: 'master'
steps:
- run: git branch --track "${{ env.RELEASE }}" "origin/${{ env.RELEASE }}"
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: rickstaa/action-contains-tag@v1
- name: "Check if '${{ github.ref }}' tag is on '${{ env.MAIN_BR }}' branch"
uses: rickstaa/action-contains-tag@v1
id: main_contains_tag
with:
reference: "master"
reference: ${{ env.MAIN_BR }}
tag: "${{ github.ref }}"

- uses: rickstaa/action-contains-tag@v1
- name: "Check if '${{ github.ref }}' tag is on '${{ env.RELEASE }}' branch"
uses: rickstaa/action-contains-tag@v1
id: release_contains_tag
with:
reference: "release"
reference: ${{ env.RELEASE }}
tag: "${{ github.ref }}"

- name: Pick Production or Test Environment, if tag on master or release branch respectively
Expand Down

0 comments on commit 4f3f57a

Please sign in to comment.