Skip to content

Nightly Release

Nightly Release #245

Workflow file for this run

name: Nightly Release
on:
workflow_dispatch:
schedule:
- cron: 0 0 * * *
permissions:
contents: read
defaults:
run:
shell: bash
jobs:
check:
name: Check for new commits
runs-on: ubuntu-latest
outputs:
new_commits: ${{ steps.commit_check.outputs.new_commits }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
persist-credentials: false
- name: Check for new commits since last nightly
id: commit_check
run: |
if git rev-parse nightly >/dev/null 2>&1; then
if [ -z "$(git log nightly..HEAD --oneline)" ]; then
echo "No new commits since last nightly release, skipping."
echo "new_commits=false" >> "$GITHUB_OUTPUT"
exit 0
fi
fi
echo "new_commits=true" >> "$GITHUB_OUTPUT"
nightly:
name: Nightly build
needs: check
if: needs.check.outputs.new_commits == 'true'
runs-on: ubuntu-latest
permissions:
contents: write
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: extractions/setup-just@f8a3cce218d9f83db3a2ecd90e41ac3de6cdfd9b # v3.1.0
- uses: erlef/setup-beam@ee09b1e59bb240681c382eb1f0abc6a04af72764 # v1.23.0
with:
otp-version: "27.3.4.1"
elixir-version: "1.17.3"
version-type: strict
- uses: mlugg/setup-zig@d1434d08867e3ee9daa34448df10607b98908d29 # v2.2.1
with:
version: "0.15.2"
- run: just deps expert
- run: just deps engine
- name: Set release version to latest rev
run: sed -i "$ s/$/-$(git rev-parse --short HEAD)/" version.txt
- env:
MIX_ENV: prod
run: just burrito
- name: Create Checksum
run: |
cd ./apps/expert/burrito_out
chmod +x ./*
shasum -a 256 ./* > expert_checksums.txt
cd ../../../
- name: Delete previous nightly release
run: |
gh release delete nightly --yes || true
gh api -X DELETE repos/${{ github.repository }}/git/refs/tags/nightly || true
- name: Create nightly release
run: gh release create nightly --prerelease ./apps/expert/burrito_out/*