Skip to content
This repository has been archived by the owner on Jun 21, 2024. It is now read-only.

Build on nightly

Build on nightly #781

name: Build on nightly
# Controls when the workflow will run
on:
pull_request:
branches: [ master ]
schedule:
- cron: '0 0 * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/[email protected]
with:
java-version: 21
distribution: zulu
- run: |
today=$(date -d today +%Y-%m-%d)
yesterday=$(date -d yesterday +%Y-%m-%d)
today_url="https://flix.dev/nightly/flix-${today}.jar"
yesterday_url="https://flix.dev/nightly/flix-${yesterday}.jar"
curl -L -f "${today_url}" > flix.jar || curl -L -f "${yesterday_url}" > flix.jar
java -jar flix.jar test