Skip to content

Commit

Permalink
fix(actions): test conditional needs
Browse files Browse the repository at this point in the history
  • Loading branch information
curzolapierre committed Mar 14, 2024
1 parent cbc7baa commit b6fd3cd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ jobs:
releases:
needs: [linter-master, linter-pull-request, tests]
name: GoReleaser Build on All OS but Windows
if: startsWith(github.ref, 'refs/tags/')
# related to https://github.com/actions/runner/issues/2205
# since a success() is added by default and skipped jobs make success to fail we need this workaround
if: ${{ always() && startsWith(github.ref, 'refs/tags/') && (needs.linter-master.result == 'success' || needs.linter-pull-request.result =='success') }}
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
Expand All @@ -94,7 +96,9 @@ jobs:
releases-windows:
needs: [linter-master, linter-pull-request, tests]
name: GoReleaser Build on Windows
if: startsWith(github.ref, 'refs/tags/')
# related to https://github.com/actions/runner/issues/2205
# since a success() is added by default and skipped jobs make success to fail we need this workaround
if: ${{ always() && startsWith(github.ref, 'refs/tags/') && (needs.linter-master.result == 'success' || needs.linter-pull-request.result =='success') }}
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
Expand Down

0 comments on commit b6fd3cd

Please sign in to comment.