From 75901c8df5cee0d4aef8385e3f1201045f6560cd Mon Sep 17 00:00:00 2001 From: Yimura Date: Mon, 3 Jan 2022 17:19:03 +0100 Subject: [PATCH] feat(Actions): Added nightly build --- .github/workflows/nightly.yml | 66 +++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 .github/workflows/nightly.yml diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml new file mode 100644 index 00000000..b7d7f0cc --- /dev/null +++ b/.github/workflows/nightly.yml @@ -0,0 +1,66 @@ +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 + + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v1.1.1 + + - 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: Get commit short sha for nightly name + id: short-sha + run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" + + - name: Create nightly release + id: create_release + uses: viperproject/create-nightly-release@v1.1.5 + env: + # This token is provided by Actions, you do not need to create your own token + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ steps.vars.outputs.sha_short }} + release_name: Nightly Release ${{ steps.vars.outputs.sha_short }} + body: | + This nightly release is provided for testing purpose only, there's no warrenty provided if your account gets banned online. + + Use this to test and see if you can run the menu as-is, if it works and you're unable to use your own version check if your build environment is setup correctly. + keep_num: 0 + keep_tags: false \ No newline at end of file