Skip to content

Github Actions Nightly #1117

Github Actions Nightly

Github Actions Nightly #1117

Workflow file for this run

name: Github Actions Nightly
on:
schedule:
- cron: "0 15 * * *" # run at 3 PM UTC every day
push:
paths:
- "**/Nightly.yml"
workflow_dispatch:
jobs:
release:
name: Windows ${{ matrix.build_type }}
runs-on: windows-2022
steps:
- uses: actions/checkout@v3
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Pull latest Overlunky
run: |
pushd submodules/overlunky
git status
git config user.email "[email protected]"
git config user.name "Autobuilder"
git pull origin main
git submodule update --init --recursive
popd
- uses: actions/setup-python@v2
- uses: lukka/get-cmake@latest
- name: Prepare
run: |
python -m pip install --upgrade pip
pip install conan==1.59.0
- name: Cache conan
uses: actions/cache@v3
with:
path: |
c:/Users/runneradmin/.conan
c:/.conan
key: ${{ matrix.build_type }}-conan-cpp23-${{ hashFiles('**/conanfile.txt') }}
- name: Configure
run: |
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CONFIGURATION_TYPES=Release -DPLAYLUNKY_CONAN_VERBOSE=ON
- name: Build
run: |
cd build
cmake --build . --config Release
- name: Install
run: |
cd build
cmake --install . --config Release
- name: Zip Release
id: artifacts
run: |
pushd publish
tar -a -c -f ../playlunky_nightly.zip *
popd
echo "##[set-output name=hash;]$(( Get-FileHash playlunky_nightly.zip ).Hash.substring(0, 7))"
- name: Rename Artifact
run: Rename-Item playlunky_nightly.zip playlunky_nightly_${{ steps.artifacts.outputs.hash }}.zip
- name: Create release
uses: marvinpinto/[email protected]
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "nightly"
prerelease: true
title: "Nightly Build"
files: ./playlunky_nightly_${{ steps.artifacts.outputs.hash }}.zip