Update build.yml to only run codecov on linux for now #65
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build a branch | ||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
jobs: | ||
build: | ||
name: Build (Java ${{ matrix.java-version }} on ${{ matrix.os-name }}) | ||
runs-on: ${{ matrix.os-name }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os-name: [ubuntu-latest, macos-latest, windows-latest] | ||
java-version: [11, 21] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Set up JDK ${{ matrix.java-version }} | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: ${{ matrix.java-version }} | ||
distribution: 'temurin' | ||
cache: maven | ||
- name: Build with Maven | ||
shell: bash | ||
run: ./mvnw -B verify javadoc:jar | ||
- name: Publish to codecov | ||
continue-on-error: true | ||
if: matrix.os-name == "ubuntu-latest" && always() | ||
Check failure on line 37 in .github/workflows/build.yml GitHub Actions / Build a branchInvalid workflow file
|
||
shell: bash | ||
run: |- | ||
curl --fail https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring \ | ||
--keyring trustedkeys.gpg --import | ||
curl --fail -Os https://uploader.codecov.io/latest/linux/codecov | ||
curl --fail -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM | ||
curl --fail -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig | ||
gpgv codecov.SHA256SUM.sig codecov.SHA256SUM | ||
shasum -a 256 -c codecov.SHA256SUM | ||
chmod -v +x codecov | ||
./codecov -v | ||
documentation: | ||
name: Publish documentation | ||
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request' | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pages: write | ||
id-token: write | ||
needs: | ||
- build | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '11' | ||
distribution: 'temurin' | ||
cache: maven | ||
- name: Generate site | ||
run: ./mvnw -B site | ||
- name: Upload site | ||
uses: actions/upload-pages-artifact@v2 | ||
with: | ||
path: target/site | ||
- name: Deploy site | ||
id: site | ||
uses: actions/deploy-pages@v2 |