cave-story-randomizer/.github/workflows/daily.yml

43 lines
1.2 KiB
YAML

name: MALCO's Daily Challenge
on:
schedule:
- cron: '53 15 * * *' # 9:53 AM, UTC-6
workflow_dispatch:
jobs:
Build:
runs-on: '${{ matrix.os }}'
strategy:
matrix:
os:
- ubuntu-18.04
steps:
- uses: leafo/gh-actions-lua@v8.0.0
- uses: leafo/gh-actions-luarocks@v4.0.0
with:
luarocksVersion: 3.0
- uses: actions/checkout@v2
with:
ref: 'stable'
- name: Install dependencies (Ubuntu)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libzip-dev xvfb
sudo add-apt-repository -y ppa:bartbes/love-stable
sudo apt-get -q update
sudo apt-get -y install love
luarocks install --server="http://luarocks.org/dev" lua-zip
luarocks install love-release
- name: Generate Daily
env:
WEBHOOK: ${{ secrets.WEBHOOK }}
run: |
cd $GITHUB_WORKSPACE
cd src
love-release
sudo xvfb-run -a --server-args="-screen 0 1024x768x24" love "releases/CaveStoryRandomizer.love" --daily
cat daily.txt
curl -H "Content-Type: application/json" -X POST -d @daily.txt "$WEBHOOK"