This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
YimMenu/.github/workflows/nightly.yml

80 lines
2.6 KiB
YAML
Raw Normal View History

2022-01-03 17:19:03 +01:00
name: Nightly Public Build
on:
schedule:
# cronjob that triggers every day at 2PM UTC
- cron: '0 14 * * *'
workflow_dispatch:
jobs:
check_date:
runs-on: ubuntu-latest
name: Check latest commit
outputs:
should_run: ${{ steps.should_run.outputs.should_run }}
steps:
- uses: actions/checkout@v2
- id: should_run
continue-on-error: true
name: Check if latest commit date is within the previous 24 hours
if: ${{ github.event_name == 'schedule' }}
run: test -z $(git rev-list --after="24 hours" ${{ github.sha }}) && echo "::set-output name=should_run::false"
build-nightly:
runs-on: windows-latest
name: Build Nightly
needs: check_date
if: ${{ needs.check_date.outputs.should_run != 'false' }}
steps:
- uses: actions/checkout@v2.4.0
with:
submodules: recursive
- name: Setup premake
uses: abel0b/setup-premake@v2
with:
version: "5.0.0-beta1"
2022-01-03 17:19:03 +01:00
- name: Add msbuild to PATH
2022-01-03 17:22:00 +01:00
uses: microsoft/setup-msbuild@v1.1
2022-01-03 17:19:03 +01:00
- name: Generate premake5 project
run: premake5 vs2019
shell: bash
- name: Build 64bit release DLL
run: |
msbuild /p:Configuration=Release /p:Platform=x64 BigBaseV2.sln
- name: Rename DLL to YimMenu.dll
run: ren BigBaseV2.dll YimMenu.dll
working-directory: bin/Release/
2022-01-03 17:19:03 +01:00
- name: Get commit short sha for nightly name
2022-01-03 17:58:04 +01:00
id: short_sha
2022-01-03 17:19:03 +01:00
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- name: Nightly Release
uses: softprops/action-gh-release@v1
2022-01-03 17:19:03 +01:00
with:
2022-01-03 18:00:30 +01:00
name: Nightly ${{ steps.short_sha.outputs.sha_short }}
tag_name: nightly_${{ steps.short_sha.outputs.sha_short }}
2022-01-03 17:19:03 +01:00
body: |
2022-01-03 18:00:30 +01:00
This nightly release is provided for testing purposes only, there's no warranty provided if your account gets banned online.
Use this to test and see if you can run the menu as-is in single player, if it works and you're unable to use your own version check if your build environment is setup correctly.
If you're going to link externally use the following link to always get the latest version of YimMenu.dll:
https://github.com/Yimura/YimMenu/releases/latest/download/YimMenu.dll
files: |
bin/Release/YimMenu.dll
2022-01-03 17:19:03 +01:00
- name: Keep only the last 7 nightly builds, any other nightlies will be removed
uses: dev-drprasad/delete-older-releases@v0.2.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2022-01-03 17:49:09 +01:00
with:
keep_latest: 7
delete_tag_pattern: 'nightly_*'