diff --git a/.github/setup.sh b/.github/setup.sh index a03464be..0ebca586 100755 --- a/.github/setup.sh +++ b/.github/setup.sh @@ -1,3 +1,10 @@ #!/bin/sh curl -fsLO https://raw.githubusercontent.com/scijava/scijava-scripts/main/ci-setup-github-actions.sh sh ci-setup-github-actions.sh + +# Let the Linux build handle artifact deployment. +if [ "$(uname)" != Linux ] +then + echo "No deploy -- non-Linux build" + echo "NO_DEPLOY=1" >> $GITHUB_ENV +fi diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml deleted file mode 100644 index ac5696fb..00000000 --- a/.github/workflows/build-pr.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: build PR - -on: - pull_request: - branches: - - master - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Set up Java - uses: actions/setup-java@v2 - with: - java-version: '8' - distribution: 'zulu' - cache: 'maven' - - name: Set up CI environment - run: .github/setup.sh - - name: Execute the build - run: .github/build.sh diff --git a/.github/workflows/build-main.yml b/.github/workflows/build.yml similarity index 90% rename from .github/workflows/build-main.yml rename to .github/workflows/build.yml index f77cfd03..19b0851a 100644 --- a/.github/workflows/build-main.yml +++ b/.github/workflows/build.yml @@ -6,6 +6,9 @@ on: - master tags: - "*-[0-9]+.*" + pull_request: + branches: + - master jobs: build: @@ -24,8 +27,10 @@ jobs: cache: 'maven' - name: Set up CI environment run: .github/setup.sh + shell: bash - name: Execute the build run: .github/build.sh + shell: bash env: GPG_KEY_NAME: ${{ secrets.GPG_KEY_NAME }} GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}