Skip to content

build

build #317

Workflow file for this run

name: build
on:
push:
branches:
- master
pull_request:
branches:
- master
schedule:
- cron: "4 5 * * 0" # every Sunday at 0405, to keep cache alive
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Java
uses: actions/setup-java@v3
with:
java-version: '8'
java-package: 'jdk+fx'
distribution: 'zulu'
cache: 'maven'
- name: Set up CI environment
run: .github/setup.sh
- name: Restore the melting-pot cache
id: restore-cache
uses: actions/cache/restore@v3
with:
path: ~/.cache/scijava/melting-pot
key: ${{ runner.os }}-cache
- name: Execute the build
id: execute-build
run: .github/build.sh
env:
GPG_KEY_NAME: ${{ secrets.GPG_KEY_NAME }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
MAVEN_USER: ${{ secrets.MAVEN_USER }}
MAVEN_PASS: ${{ secrets.MAVEN_PASS }}
OSSRH_PASS: ${{ secrets.OSSRH_PASS }}
SIGNING_ASC: ${{ secrets.SIGNING_ASC }}
- name: Delete the melting-pot cache
if: env.cacheChanged == 'true'
id: delete-cache
run: |
gh api --method DELETE -H "Accept: application/vnd.github+json" /repos/scijava/pom-scijava/actions/caches?key=${{ runner.os }}-cache || true
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
- name: Save the melting-pot cache
if: env.cacheChanged == 'true'
id: save-cache
uses: actions/cache/save@v3
with:
path: ~/.cache/scijava/melting-pot
key: ${{ runner.os }}-cache
- name: Return the exit code
id: exit-build
run: .github/exit.sh