Skip to content

Commit 03c1b28

Browse files
authored
[BUGFIX] ci: Define conditions to publish the release properly (#5061)
Otherwise, the release job will be executed each time.
1 parent b0b2434 commit 03c1b28

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

.github/workflows/argilla-v1.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ jobs:
101101
publish_release:
102102
name: Publish Release
103103
runs-on: ubuntu-latest
104-
if: github.ref == 'refs/heads/main' || ${{ github.event_name }} == 'workflow_dispatch'
104+
if: ${{ github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch' }}
105105

106106
permissions:
107107
# This permission is needed for private repositories.

.github/workflows/argilla.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,7 @@ jobs:
8181
publish_release:
8282
name: Publish Release
8383
runs-on: ubuntu-latest
84-
if: github.ref == 'refs/heads/main' || ${{ github.event_name }} == 'workflow_dispatch'
85-
needs:
86-
- build
84+
if: ${{ github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch' }}
8785

8886
permissions:
8987
# This permission is needed for private repositories.
@@ -93,6 +91,9 @@ jobs:
9391
# This permission is needed for creating tags
9492
contents: write
9593

94+
needs:
95+
- build
96+
9697
defaults:
9798
run:
9899
shell: bash -l {0}

0 commit comments

Comments
 (0)