diff options
author | Christian Moritz <chrmoritz@users.noreply.github.com> | 2019-10-05 16:45:35 +0200 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-10-05 10:45:35 -0400 |
commit | 351d40e51cd5fc09c36df93da890d16587f29756 (patch) | |
tree | 3c12b57cbe143f2513281ba6691ee19f2ba4cf8f | |
parent | 2a02107bba27685324e62bd099ccaaac9c3b08d5 (diff) |
CI: don't build while linting and publish in forks (#3070)
-rw-r--r-- | .github/workflows/build.yml | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a1c321c98..c6e526b2c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -99,6 +99,7 @@ jobs: run: cargo clippy --all-targets --release --locked -- -D clippy::all - name: Build + if: matrix.kind != 'lint' run: cargo build --release --locked --all-targets - name: Test @@ -110,7 +111,7 @@ jobs: run: python ./tools/benchmark.py target/release - name: Post Benchmarks - if: matrix.kind == 'bench' && github.ref == 'refs/heads/master' + if: matrix.kind == 'bench' && github.ref == 'refs/heads/master' && github.repository == 'denoland/deno' env: DENOBOT_PAT: ${{ secrets.DENOBOT_PAT }} run: | @@ -132,20 +133,20 @@ jobs: cat /proc/meminfo - name: Pre-release (linux) - if: startsWith(matrix.os, 'ubuntu') + if: startsWith(matrix.os, 'ubuntu') && matrix.kind != 'lint' run: gzip -c target/release/deno > target/release/deno_linux_x64.gz - name: Pre-release (mac) - if: startsWith(matrix.os, 'macOS') + if: startsWith(matrix.os, 'macOS') && matrix.kind != 'lint' run: gzip -c target/release/deno > target/release/deno_osx_x64.gz - name: Pre-release (windows) - if: startsWith(matrix.os, 'windows') + if: startsWith(matrix.os, 'windows') && matrix.kind != 'lint' run: PowerShell -Command "& {Compress-Archive -CompressionLevel Optimal -Force -Path target/release/deno.exe -DestinationPath target/release/deno_win_x64.zip}" - name: Release uses: softprops/action-gh-release@v1 - if: matrix.kind == 'test' && startsWith(github.ref, 'refs/tags/') + if: matrix.kind == 'test' && startsWith(github.ref, 'refs/tags/') && github.repository == 'denoland/deno' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: |