Github Actions Nightly #1381
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 zombie-imp | |
pip install conan==2.4.1 | |
- 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: Install MSVC build tools 14.39 | |
run: | | |
& ".github\workflows\install_msvc1439.ps1" | |
- name: Configure | |
run: | | |
mkdir build | |
cd build | |
cmake .. -A x64 -T v143,version=14.39 -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 |