Skip to content

Commit 2bd1529

Browse files
Avoid running publish-go-tester-task if tag is set
1 parent 76251df commit 2bd1529

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

.github/workflows/publish-go-tester-task.yml

+14-3
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,25 @@ jobs:
3535
outputs:
3636
result: ${{ steps.determination.outputs.result }}
3737
steps:
38+
- name: Checkout repository
39+
uses: actions/checkout@v3
40+
with:
41+
fetch-depth: 0
42+
43+
- name: Install Task
44+
uses: arduino/setup-task@v1
45+
with:
46+
repo-token: ${{ secrets.GITHUB_TOKEN }}
47+
version: 3.x
48+
3849
- name: Determine if the rest of the workflow should run
3950
id: determination
4051
run: |
41-
RELEASE_BRANCH_REGEX="refs/heads/[0-9]+.[0-9]+.x"
52+
VERSION=$(task general:get-version)
4253
# The `create` event trigger doesn't support `branches` filters, so it's necessary to use Bash instead.
4354
if [[ \
44-
"${{ github.event_name }}" != "create" || \
45-
"${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX \
55+
"${{ github.event_name }}" != "create" && \
56+
"$VERSION" == *git-snapshot \
4657
]]; then
4758
# Run the other jobs.
4859
RESULT="true"

0 commit comments

Comments
 (0)