feat(Actions): Added nightly build
This commit is contained in:
parent
9a6326fb49
commit
75901c8df5
66
.github/workflows/nightly.yml
vendored
Normal file
66
.github/workflows/nightly.yml
vendored
Normal file
@ -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
|
Reference in New Issue
Block a user