mirror of
https://github.com/GaloisInc/cryptol.git
synced 2024-11-23 22:27:25 +03:00
prevent duplicate runs if actions/ has a PR
This commit is contained in:
parent
a023b4de5a
commit
0a231880f5
29
.github/workflows/build.yml
vendored
29
.github/workflows/build.yml
vendored
@ -24,6 +24,7 @@ jobs:
|
||||
|
||||
build:
|
||||
runs-on: ${{ matrix.os }}
|
||||
needs: [outputs]
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@ -78,7 +79,9 @@ jobs:
|
||||
run: .github/ci.sh test_dist
|
||||
|
||||
- if: >-
|
||||
(startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/heads/actions/'))
|
||||
(startsWith(github.ref, 'refs/tags/v')
|
||||
|| (github.event_name == 'pull_request'
|
||||
&& startsWith(github.ref, 'refs/heads/actions/')))
|
||||
&& matrix.ghc == '8.10.1'
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
@ -89,7 +92,9 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [outputs]
|
||||
if: >-
|
||||
(startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/heads/actions/'))
|
||||
(startsWith(github.ref, 'refs/tags/v')
|
||||
|| (github.event_name == 'pull_request'
|
||||
&& startsWith(github.ref, 'refs/heads/actions/')))
|
||||
|| contains(needs.outputs.outputs.changed, 'docs/')
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
@ -110,7 +115,10 @@ jobs:
|
||||
|
||||
bundle:
|
||||
runs-on: ${{ matrix.os }}
|
||||
if: "startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/heads/actions/')"
|
||||
if: >-
|
||||
startsWith(github.ref, 'refs/tags/v')
|
||||
|| (github.event_name == 'pull_request'
|
||||
&& startsWith(github.ref, 'refs/heads/actions/'))
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
@ -160,16 +168,19 @@ jobs:
|
||||
path: "cryptol.msi*"
|
||||
|
||||
release:
|
||||
if: "startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/heads/actions/')"
|
||||
outputs:
|
||||
upload_url: ${{ steps.release.outputs.upload_url }}
|
||||
if: >-
|
||||
startsWith(github.ref, 'refs/tags/v')
|
||||
|| (github.event_name == 'pull_request'
|
||||
&& startsWith(github.ref, 'refs/heads/actions/'))
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- id: release
|
||||
uses: release-drafter/release-drafter@v5
|
||||
- uses: release-drafter/release-drafter@v5
|
||||
|
||||
upload-artifacts-to-release:
|
||||
if: "startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/heads/actions/')"
|
||||
if: >-
|
||||
startsWith(github.ref, 'refs/tags/v')
|
||||
|| (github.event_name == 'pull_request'
|
||||
&& startsWith(github.ref, 'refs/heads/actions/'))
|
||||
needs: [outputs, bundle, release]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
Loading…
Reference in New Issue
Block a user