From 3206c51b0a09c573e045f5bd8d9a483ef56bb906 Mon Sep 17 00:00:00 2001 From: Yimura Date: Tue, 11 Jan 2022 13:42:01 +0100 Subject: [PATCH 01/12] feat(Actions): Adjusted for UC guidelines --- .github/workflows/nightly.yml | 58 +++++++++++++++++++++++++++-------- 1 file changed, 46 insertions(+), 12 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 9622a179..a1fd3ae7 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -30,7 +30,7 @@ jobs: - uses: actions/checkout@v2.4.0 with: submodules: recursive - + - name: Setup premake uses: abel0b/setup-premake@v2 with: @@ -51,6 +51,34 @@ jobs: run: ren BigBaseV2.dll YimMenu.dll working-directory: bin/Release/ + - name: Generate Hash for binary + run: powershell.exe "Get-FileHash YimMenu.dll | Select-Object -ExpandProperty Hash | Out-File sha256.checksum" + working-director: bin/Release/ + + - name: Upload Artifact + uses: actions/upload-artifact@v2 + with: + name: binary + path: | + bin/Release/YimMenu.dll + bin/Release/sha256.checksum + + create-release: + runs-on: ubuntu-latest + name: Create Release + needs: build-nightly + steps: + - name: Download Artifact + uses: actions/download-artifact@v2 + with: + name: binary + + - name: Echo build sha256 + id: build_sha + run: | + echo "::set-output name=build_sha::$(cat sha256.checksum)" + cat sha256.checksum + - name: Get commit short sha for nightly name id: short_sha run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" @@ -59,21 +87,27 @@ jobs: uses: softprops/action-gh-release@v1 with: name: Nightly ${{ steps.short_sha.outputs.sha_short }} - 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. + **This release has been build by Github Actions** + [Link to build](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) - 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 + Build SHA256: + ``` + ${{ steps.build_sha.outputs.build_sha }} + ``` + Compare this against the build hash found in the build artifacts, build artifacts can NEVER be modified after they occurred. + + These are nightly builds of YimMenu, they are provided for testing purposes only: + - Test if your build environment produces a broken BigBaseV2.dll + - Test if source code is out of date and no longer compatible with the current version of GTA V + + If you wish to use this menu as-is you are on your own, no warranty is provided. files: | - bin/Release/YimMenu.dll + YimMenu.dll - - name: Keep only the last 7 nightly builds, any other nightlies will be removed + - name: Keep only latest 3 nightly uses: dev-drprasad/delete-older-releases@v0.2.0 + with: + keep_latest: 3 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - keep_latest: 7 - delete_tag_pattern: 'nightly_*' From fe61bed1e03b5954c5a349710303af2ba2c11eca Mon Sep 17 00:00:00 2001 From: Yimura Date: Tue, 11 Jan 2022 13:48:28 +0100 Subject: [PATCH 02/12] fix(Actions): Typo --- .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 a1fd3ae7..4627ad48 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -1,4 +1,4 @@ -name: Nightly Public Build +name: Nightly Build on: schedule: @@ -53,7 +53,7 @@ jobs: - name: Generate Hash for binary run: powershell.exe "Get-FileHash YimMenu.dll | Select-Object -ExpandProperty Hash | Out-File sha256.checksum" - working-director: bin/Release/ + working-directory: bin/Release/ - name: Upload Artifact uses: actions/upload-artifact@v2 From aad7072753257cc805f60babf092531b1f724163 Mon Sep 17 00:00:00 2001 From: Yimura Date: Tue, 11 Jan 2022 14:00:33 +0100 Subject: [PATCH 03/12] fix(Actions): Github release requires tag --- .github/workflows/nightly.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 4627ad48..eff81f62 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -86,7 +86,8 @@ jobs: - name: Nightly Release uses: softprops/action-gh-release@v1 with: - name: Nightly ${{ steps.short_sha.outputs.sha_short }} + name: Nightly [${{ steps.short_sha.outputs.sha_short }}] + tag_name: nightly_${{ steps.short_sha.outputs.sha_short }} body: | **This release has been build by Github Actions** [Link to build](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) From 122819477379bb2dad049decd51a8fb04ae8514d Mon Sep 17 00:00:00 2001 From: Yimura Date: Tue, 11 Jan 2022 14:07:40 +0100 Subject: [PATCH 04/12] fix(Actions): Commit hash of build --- .github/workflows/nightly.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index eff81f62..d695c990 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -63,6 +63,10 @@ jobs: bin/Release/YimMenu.dll bin/Release/sha256.checksum + - name: Get commit short sha for nightly name + id: short_sha + run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" + create-release: runs-on: ubuntu-latest name: Create Release @@ -79,15 +83,11 @@ jobs: echo "::set-output name=build_sha::$(cat sha256.checksum)" cat sha256.checksum - - name: Get commit short sha for nightly name - 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 [${{ steps.short_sha.outputs.sha_short }}] - tag_name: nightly_${{ steps.short_sha.outputs.sha_short }} + name: Nightly [${{ needs.build-nightly.steps.short_sha.outputs.sha_short }}] + tag_name: nightly body: | **This release has been build by Github Actions** [Link to build](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) From 77418fafe7e57bbe664b65f39cfba6c2f64dcad7 Mon Sep 17 00:00:00 2001 From: Yimura Date: Tue, 11 Jan 2022 14:20:49 +0100 Subject: [PATCH 05/12] fix(Actions): Job's should use underscore names --- .github/workflows/nightly.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index d695c990..3528415b 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -21,7 +21,7 @@ jobs: 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: + build_nightly: runs-on: windows-latest name: Build Nightly needs: check_date @@ -67,7 +67,7 @@ jobs: id: short_sha run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" - create-release: + create_release: runs-on: ubuntu-latest name: Create Release needs: build-nightly @@ -80,13 +80,13 @@ jobs: - name: Echo build sha256 id: build_sha run: | - echo "::set-output name=build_sha::$(cat sha256.checksum)" + echo "::set-output name=build_sha::$(sha256sum YimMenu.dll)" cat sha256.checksum - name: Nightly Release uses: softprops/action-gh-release@v1 with: - name: Nightly [${{ needs.build-nightly.steps.short_sha.outputs.sha_short }}] + name: Nightly [${{ needs.build_nightly.steps.short_sha.outputs.sha_short }}] tag_name: nightly body: | **This release has been build by Github Actions** From ee84b8bd1d8e9cdc1950fc1879fc2229b2e60b33 Mon Sep 17 00:00:00 2001 From: Yimura Date: Tue, 11 Jan 2022 14:22:46 +0100 Subject: [PATCH 06/12] fix(Actions): Removed checksum from Windows step --- .github/workflows/nightly.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 3528415b..175da3a0 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -51,17 +51,12 @@ jobs: run: ren BigBaseV2.dll YimMenu.dll working-directory: bin/Release/ - - name: Generate Hash for binary - run: powershell.exe "Get-FileHash YimMenu.dll | Select-Object -ExpandProperty Hash | Out-File sha256.checksum" - working-directory: bin/Release/ - - name: Upload Artifact uses: actions/upload-artifact@v2 with: name: binary path: | bin/Release/YimMenu.dll - bin/Release/sha256.checksum - name: Get commit short sha for nightly name id: short_sha @@ -70,7 +65,7 @@ jobs: create_release: runs-on: ubuntu-latest name: Create Release - needs: build-nightly + needs: build_nightly steps: - name: Download Artifact uses: actions/download-artifact@v2 From bea8dc2c314290553a96130c841909d766185740 Mon Sep 17 00:00:00 2001 From: Yimura Date: Tue, 11 Jan 2022 14:27:11 +0100 Subject: [PATCH 07/12] fix(Actions): Create checksum file --- .github/workflows/nightly.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 175da3a0..bbae1512 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -75,7 +75,8 @@ jobs: - name: Echo build sha256 id: build_sha run: | - echo "::set-output name=build_sha::$(sha256sum YimMenu.dll)" + sha256sum YimMenu.dll > sha256.checksum + echo "::set-output name=build_sha::$(cat sha256.checksum)" cat sha256.checksum - name: Nightly Release From 71ced3f219de2acd1171dde3164c69ec7425ad10 Mon Sep 17 00:00:00 2001 From: Yimura Date: Tue, 11 Jan 2022 14:43:35 +0100 Subject: [PATCH 08/12] fix(Actions): Release name and body --- .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 bbae1512..f27b81e9 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -26,6 +26,9 @@ jobs: name: Build Nightly needs: check_date if: ${{ needs.check_date.outputs.should_run != 'false' }} + outputs: + full_sha: ${{ steps.var.outputs.full_sha }} + short_sha: ${{ steps.var.outputs.short_sha }} steps: - uses: actions/checkout@v2.4.0 with: @@ -58,9 +61,11 @@ jobs: path: | bin/Release/YimMenu.dll - - name: Get commit short sha for nightly name - id: short_sha - run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" + - name: Generate Build Info + id: var + run: | + echo "::set-output name=full_sha::$(git rev-parse HEAD)" + echo "::set-output name=short_sha::$(git rev-parse --short HEAD)" create_release: runs-on: ubuntu-latest @@ -82,7 +87,7 @@ jobs: - name: Nightly Release uses: softprops/action-gh-release@v1 with: - name: Nightly [${{ needs.build_nightly.steps.short_sha.outputs.sha_short }}] + name: Nightly [${{ needs.build_nightly.outputs.short_sha }}] tag_name: nightly body: | **This release has been build by Github Actions** @@ -92,7 +97,15 @@ jobs: ``` ${{ steps.build_sha.outputs.build_sha }} ``` - Compare this against the build hash found in the build artifacts, build artifacts can NEVER be modified after they occurred. + + Full Commit Hash: + ``` + ${{ needs.build_nightly.outputs.full_sha }} + ``` + + Compare this build hash with one that you generated yourself from the build artifacts, build artifacts can be found by clicking the link to build. + Build artifacts ARE NOT automatically the same as release assets since release assets can be modified afterwards. + These are nightly builds of YimMenu, they are provided for testing purposes only: - Test if your build environment produces a broken BigBaseV2.dll @@ -101,10 +114,3 @@ jobs: If you wish to use this menu as-is you are on your own, no warranty is provided. files: | YimMenu.dll - - - name: Keep only latest 3 nightly - uses: dev-drprasad/delete-older-releases@v0.2.0 - with: - keep_latest: 3 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From c99780317d14a7212f55b6da809d116ebaeacb2e Mon Sep 17 00:00:00 2001 From: Yimura Date: Tue, 11 Jan 2022 16:23:27 +0100 Subject: [PATCH 09/12] fix(Actions): Remove previous nightlies --- .github/workflows/nightly.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index f27b81e9..609f16ef 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -84,6 +84,14 @@ jobs: echo "::set-output name=build_sha::$(cat sha256.checksum)" cat sha256.checksum + - name: Remove previous Nightly + uses: dev-drprasad/delete-tag-and-release@v0.2.0 + with: + delete_release: true + tag_name: nightly + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Nightly Release uses: softprops/action-gh-release@v1 with: From 3a937541915316430f71ca0cd1e91f5a13862b76 Mon Sep 17 00:00:00 2001 From: Yimura Date: Tue, 11 Jan 2022 16:56:44 +0100 Subject: [PATCH 10/12] feat(Actions): Modified body --- .github/workflows/nightly.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 609f16ef..4e41f9d8 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -105,20 +105,21 @@ jobs: ``` ${{ steps.build_sha.outputs.build_sha }} ``` + To verify the build SHA256 during the action, click the build link, go-to "Create Release", open the Echo build sha256 step and read the sha256. - Full Commit Hash: - ``` - ${{ needs.build_nightly.outputs.full_sha }} - ``` - - Compare this build hash with one that you generated yourself from the build artifacts, build artifacts can be found by clicking the link to build. + Compare this build hash with one that you generated yourself from the build artifacts. + Alternatively you can download the build artifacts, generate a SHA256 checksum and compare it with the below binary. Build artifacts ARE NOT automatically the same as release assets since release assets can be modified afterwards. - These are nightly builds of YimMenu, they are provided for testing purposes only: - Test if your build environment produces a broken BigBaseV2.dll - Test if source code is out of date and no longer compatible with the current version of GTA V If you wish to use this menu as-is you are on your own, no warranty is provided. + + Full Commit Hash: + ``` + ${{ needs.build_nightly.outputs.full_sha }} + ``` files: | YimMenu.dll From 610d342d08805bcab67d4a43ab909595f4ea3779 Mon Sep 17 00:00:00 2001 From: Yimura Date: Tue, 11 Jan 2022 17:50:58 +0100 Subject: [PATCH 11/12] feat(README): Removed mention of prebuild binaries --- README.md | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 1ab43400..bd278617 100644 --- a/README.md +++ b/README.md @@ -44,15 +44,13 @@ GenerateProjects.bat ``` Now, you will be able to open the solution, and simply build it in Visual Studio. -## Prebuild Binaries +## Debugging Binaries -Every 24 hours a build of YimMenu is made if new code has been committed to the master branch. +If you fail to create a working build of YimMenu you can try one of the nightly prebuild binaries. +They are automatically build for testing purposes only, they should not be used online. +Try and see if these builds work and if they don't create an issue about what isn't working. -These prebuild binaries are provided for testing purposes only, I will take no responsibility for people using it online. - -Perma Link for latest [YimMenu.dll](https://github.com/Yimura/YimMenu/releases/latest/download/YimMenu.dll). - -Perma Link for the latest [nightly](https://github.com/Yimura/YimMenu/releases/latest). +[Link to debugging binaries](https://github.com/Yimura/YimMenu/releases/latest) ## Project Structure @@ -80,4 +78,4 @@ Below is an incomplete list of feature that I believe are notable to this "base" You're free to contribute to YimMenu as long as the feature are useful, non-toxic and do not contain anything money related that might get the menu targetted by Take2. -Make sure to read the [CONTRIBUTING.md](CONTRIBUTING.md) file. \ No newline at end of file +Make sure to read the [CONTRIBUTING.md](CONTRIBUTING.md) file. From 902de439646ba4194d270a258b928629ad1a9d0e Mon Sep 17 00:00:00 2001 From: Yimura Date: Tue, 11 Jan 2022 18:12:19 +0100 Subject: [PATCH 12/12] feat(README): Remove any mention to releases --- README.md | 8 -------- 1 file changed, 8 deletions(-) diff --git a/README.md b/README.md index bd278617..fe2e39b1 100644 --- a/README.md +++ b/README.md @@ -44,14 +44,6 @@ GenerateProjects.bat ``` Now, you will be able to open the solution, and simply build it in Visual Studio. -## Debugging Binaries - -If you fail to create a working build of YimMenu you can try one of the nightly prebuild binaries. -They are automatically build for testing purposes only, they should not be used online. -Try and see if these builds work and if they don't create an issue about what isn't working. - -[Link to debugging binaries](https://github.com/Yimura/YimMenu/releases/latest) - ## Project Structure - `api/` contains some basic example of how I'd make REST api calls