Skip to content

Commit

Permalink
[BUGFIX] ci: Define conditions to publish the release properly (#5061)
Browse files Browse the repository at this point in the history
Otherwise, the release job will be executed each time.
  • Loading branch information
frascuchon authored Jun 19, 2024
1 parent b0b2434 commit 03c1b28
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/argilla-v1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ jobs:
publish_release:
name: Publish Release
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' || ${{ github.event_name }} == 'workflow_dispatch'
if: ${{ github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch' }}

permissions:
# This permission is needed for private repositories.
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/argilla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,7 @@ jobs:
publish_release:
name: Publish Release
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' || ${{ github.event_name }} == 'workflow_dispatch'
needs:
- build
if: ${{ github.ref == 'refs/heads/main' || github.event_name == 'workflow_dispatch' }}

permissions:
# This permission is needed for private repositories.
Expand All @@ -93,6 +91,9 @@ jobs:
# This permission is needed for creating tags
contents: write

needs:
- build

defaults:
run:
shell: bash -l {0}
Expand Down

0 comments on commit 03c1b28

Please sign in to comment.