From 7d40e62d1ce22a1607a622a90417ae7bf0cc338c Mon Sep 17 00:00:00 2001 From: Yimura Date: Mon, 3 Jan 2022 17:19:03 +0100 Subject: [PATCH 01/11] 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 From bf73a32e2c2f562cfde372f563416dbf14a284af Mon Sep 17 00:00:00 2001 From: Yimura Date: Mon, 3 Jan 2022 17:22:00 +0100 Subject: [PATCH 02/11] fix(Actions): Setup msbuild version --- .github/workflows/nightly.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index b7d7f0cc..47b3220b 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -35,7 +35,7 @@ jobs: uses: abel0b/setup-premake@v2 - name: Add msbuild to PATH - uses: microsoft/setup-msbuild@v1.1.1 + uses: microsoft/setup-msbuild@v1.1 - name: Generate premake5 project run: premake5 vs2019 From 6fd3cc4f2ef81a85ba40114bcfc2f0c2ea94292b Mon Sep 17 00:00:00 2001 From: Yimura Date: Mon, 3 Jan 2022 17:25:09 +0100 Subject: [PATCH 03/11] fix(Action): Premake requires a select version --- .github/workflows/nightly.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 47b3220b..770ca805 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -33,6 +33,8 @@ jobs: - name: Setup premake uses: abel0b/setup-premake@v2 + with: + version: "5.0.0-beta1" - name: Add msbuild to PATH uses: microsoft/setup-msbuild@v1.1 From 34e718d25852645f46fc91015b2829cc4c1f9edd Mon Sep 17 00:00:00 2001 From: Yimura Date: Mon, 3 Jan 2022 17:44:18 +0100 Subject: [PATCH 04/11] fix(Action): Remove old nightly releases --- .github/workflows/nightly.yml | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 770ca805..fcbf07de 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -47,22 +47,28 @@ jobs: 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/ + - 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 }} + - name: Nightly Release + uses: softprops/action-gh-release@v1 with: - tag_name: ${{ steps.vars.outputs.sha_short }} - release_name: Nightly Release ${{ steps.vars.outputs.sha_short }} + name: Nightly Release ${{ steps.vars.outputs.sha_short }} + tag_name: nightly_${{ 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. + This nightly release is provided for testing purposes 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 + 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. + prerelease: true + files: | + bin/Release/YimMenu.dll + + - name: Keep only the last 7 nightly builds, any other nightlies will be removed + uses: dev-drprasad/delete-older-releases@v0.2.0 + keep_latest: 7 + delete_tag_pattern: 'nightly_*' \ No newline at end of file From a2ca7a94ad163605b16e187369178b519f659cf9 Mon Sep 17 00:00:00 2001 From: Yimura Date: Mon, 3 Jan 2022 17:45:51 +0100 Subject: [PATCH 05/11] fix(Actions): Delete tag pattern --- .github/workflows/nightly.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index fcbf07de..cdbe2229 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -71,4 +71,4 @@ jobs: - name: Keep only the last 7 nightly builds, any other nightlies will be removed uses: dev-drprasad/delete-older-releases@v0.2.0 keep_latest: 7 - delete_tag_pattern: 'nightly_*' \ No newline at end of file + delete_tag_pattern: "nightly_*" \ No newline at end of file From c0cfb74488301331005f6575c69383a5b6fd27b8 Mon Sep 17 00:00:00 2001 From: Yimura Date: Mon, 3 Jan 2022 17:47:35 +0100 Subject: [PATCH 06/11] fix(Actions): Do not use short sha in release tag --- .github/workflows/nightly.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index cdbe2229..0ac05959 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -59,7 +59,7 @@ jobs: uses: softprops/action-gh-release@v1 with: name: Nightly Release ${{ steps.vars.outputs.sha_short }} - tag_name: nightly_${{ steps.vars.outputs.sha_short }} + tag_name: nightly body: | This nightly release is provided for testing purposes only, there's no warrenty provided if your account gets banned online. @@ -71,4 +71,4 @@ jobs: - name: Keep only the last 7 nightly builds, any other nightlies will be removed uses: dev-drprasad/delete-older-releases@v0.2.0 keep_latest: 7 - delete_tag_pattern: "nightly_*" \ No newline at end of file + delete_tag_pattern: nightly \ No newline at end of file From 108acae39958cb843d41a19b2b5a3eb5c26c6bad Mon Sep 17 00:00:00 2001 From: Yimura Date: Mon, 3 Jan 2022 17:49:09 +0100 Subject: [PATCH 07/11] fix(Actions): forgot with keyword --- .github/workflows/nightly.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 0ac05959..1c62baf5 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -70,5 +70,6 @@ jobs: - name: Keep only the last 7 nightly builds, any other nightlies will be removed uses: dev-drprasad/delete-older-releases@v0.2.0 - keep_latest: 7 - delete_tag_pattern: nightly \ No newline at end of file + with: + keep_latest: 7 + delete_tag_pattern: nightly From 680a8fb12993c1e469ffd377767cced0919ab5db Mon Sep 17 00:00:00 2001 From: Yimura Date: Mon, 3 Jan 2022 17:53:22 +0100 Subject: [PATCH 08/11] fix(Actions): delete-older-releases requires token --- .github/workflows/nightly.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 1c62baf5..aa838d6e 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -70,6 +70,8 @@ jobs: - 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 }} with: keep_latest: 7 delete_tag_pattern: nightly From a260d1bf950aa1f26fec5c35fde170fc0f608523 Mon Sep 17 00:00:00 2001 From: Yimura Date: Mon, 3 Jan 2022 17:58:04 +0100 Subject: [PATCH 09/11] fix(Actions): Short SHA was not used --- .github/workflows/nightly.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index aa838d6e..a3c8421b 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -52,13 +52,13 @@ jobs: working-directory: bin/Release/ - name: Get commit short sha for nightly name - id: short-sha + id: short_sha run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" - name: Nightly Release uses: softprops/action-gh-release@v1 with: - name: Nightly Release ${{ steps.vars.outputs.sha_short }} + name: Nightly Release ${{ steps.short_sha.outputs.sha_short }} tag_name: nightly body: | This nightly release is provided for testing purposes only, there's no warrenty provided if your account gets banned online. From e3e2d43098417ce7f8464f0ecd18e845c3211c22 Mon Sep 17 00:00:00 2001 From: Yimura Date: Mon, 3 Jan 2022 18:00:30 +0100 Subject: [PATCH 10/11] fix(Actions): Typo and release name --- .github/workflows/nightly.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index a3c8421b..419347f6 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -58,13 +58,12 @@ jobs: - name: Nightly Release uses: softprops/action-gh-release@v1 with: - name: Nightly Release ${{ steps.short_sha.outputs.sha_short }} + name: Nightly ${{ steps.short_sha.outputs.sha_short }} tag_name: nightly body: | - This nightly release is provided for testing purposes only, there's no warrenty provided if your account gets banned online. + 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. - prerelease: true files: | bin/Release/YimMenu.dll From a7728d4e91e2ae4e70bc36b79aea64ef89f4e1c1 Mon Sep 17 00:00:00 2001 From: Yimura Date: Mon, 3 Jan 2022 18:08:15 +0100 Subject: [PATCH 11/11] feat(Actions): Include short SHA in tag --- .github/workflows/nightly.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 419347f6..698e19e8 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -59,7 +59,7 @@ jobs: uses: softprops/action-gh-release@v1 with: name: Nightly ${{ steps.short_sha.outputs.sha_short }} - tag_name: nightly + tag_name: nightly_${{ steps.short_sha.outputs.sha_short }} body: | This nightly release is provided for testing purposes only, there's no warranty provided if your account gets banned online. @@ -73,4 +73,4 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: keep_latest: 7 - delete_tag_pattern: nightly + delete_tag_pattern: 'nightly_*'