Skip to content

Nightly

Nightly #170

Workflow file for this run

name: Nightly
on:
schedule:
- cron: 0 0 * * *
permissions:
actions: write
contents: write
jobs:
linux:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Crystal
uses: crystal-lang/install-crystal@v1
with:
crystal: latest
- name: Install Dependencies
run: shards install --production
- name: Compile Binaries
run: |
crystal build src/main.cr -o crimson
tar -zcf crimson-nightly-linux-x86_64.tar.gz crimson
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: crimson
path: |
crimson
crimson-nightly-linux-x86_64.tar.gz
windows:
needs: linux
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Crystal
uses: crystal-lang/install-crystal@v1
with:
crystal: latest
- name: Install Dependencies
run: shards install --production
- name: Compile Binaries
run: |
crystal build src\main.cr -o crimson.exe
$compress = @{
Path = "crimson.exe", "crimson.pdb"
DestinationPath = "crimson-nightly-windows-x86_64-msvc.zip"
}
Compress-Archive @compress
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: crimson
path: |
crimson.exe
crimson.pdb
crimson-nightly-windows-x86_64-msvc.zip
release:
needs: windows
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download Artifacts
uses: actions/download-artifact@v3
with:
path: artifacts/
- name: Prepare Artifacts
run: |
mv artifacts/crimson/* .
sha256sum crimson crimson.exe crimson.pdb > checksums.txt
- name: Create Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release view nightly &>/dev/null && gh release delete nightly -y
gh release create nightly -pt Nightly --notes "Nightly release for $(date +%F)."
gh release upload nightly checksums.txt
gh release upload nightly crimson-nightly-linux-x86_64.tar.gz
gh release upload nightly crimson-nightly-windows-x86_64-msvc.zip