Skip to content

Build on Nightly

Build on Nightly #1057

name: Build on Nightly
# Controls when the workflow will run
on:
pull_request:
branches: [ master ]
schedule:
- cron: '0 0 * * *'
jobs:
build-nightly:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/[email protected]
with:
java-version: 21
distribution: zulu
- run: |
# download today's or yesterday's Flix JAR
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
# run tests
java -jar flix.jar test --github-token ${{ github.token }}