2022-01-11 13:48:28 +01:00
|
|
|
name: Nightly Build
|
2022-01-03 17:19:03 +01:00
|
|
|
|
|
|
|
on:
|
|
|
|
schedule:
|
|
|
|
# cronjob that triggers every day at 2PM UTC
|
|
|
|
- cron: '0 14 * * *'
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
2022-01-11 14:20:49 +01:00
|
|
|
build_nightly:
|
2022-01-03 17:19:03 +01:00
|
|
|
runs-on: windows-latest
|
|
|
|
name: Build Nightly
|
2022-01-11 14:43:35 +01:00
|
|
|
outputs:
|
|
|
|
full_sha: ${{ steps.var.outputs.full_sha }}
|
|
|
|
short_sha: ${{ steps.var.outputs.short_sha }}
|
2022-01-03 17:19:03 +01:00
|
|
|
steps:
|
2022-11-11 12:34:32 +02:00
|
|
|
- uses: actions/checkout@v3
|
2022-01-03 17:19:03 +01:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
2022-01-11 13:42:01 +01:00
|
|
|
|
2022-11-08 21:08:58 +00:00
|
|
|
- name: Check CMake version
|
|
|
|
run: cmake --version
|
2022-01-03 17:19:03 +01:00
|
|
|
|
|
|
|
- name: Add msbuild to PATH
|
2022-11-11 12:34:32 +02:00
|
|
|
uses: microsoft/setup-msbuild@v1
|
2022-01-03 17:19:03 +01:00
|
|
|
|
2022-11-08 21:08:58 +00:00
|
|
|
- name: Generate CMake project
|
|
|
|
run: cmake -S. -Bbuild -G "Visual Studio 17 2022" -DCMAKE_CONFIGURATION_TYPES=Release
|
2022-01-03 17:19:03 +01:00
|
|
|
|
|
|
|
- name: Build 64bit release DLL
|
2022-11-08 21:08:58 +00:00
|
|
|
run: cmake --build build --config Release --target ALL_BUILD
|
2022-01-03 17:44:18 +01:00
|
|
|
|
2022-01-11 13:42:01 +01:00
|
|
|
- name: Upload Artifact
|
2022-11-11 12:34:32 +02:00
|
|
|
uses: actions/upload-artifact@v3
|
2022-01-11 13:42:01 +01:00
|
|
|
with:
|
|
|
|
name: binary
|
2022-11-08 21:08:58 +00:00
|
|
|
path: build/Release/YimMenu.dll
|
2022-01-11 13:42:01 +01:00
|
|
|
|
2022-01-11 14:43:35 +01:00
|
|
|
- name: Generate Build Info
|
|
|
|
id: var
|
|
|
|
run: |
|
2022-11-11 12:34:32 +02:00
|
|
|
echo "full_sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
|
|
|
|
echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
2022-01-11 14:07:40 +01:00
|
|
|
|
2022-07-19 14:38:23 +02:00
|
|
|
check_detections:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
name: Check for detections in Binary and notify if necesarry
|
|
|
|
needs: build_nightly
|
|
|
|
steps:
|
|
|
|
- name: Download Artifact
|
2022-11-11 12:34:32 +02:00
|
|
|
uses: actions/download-artifact@v3
|
2022-07-19 14:38:23 +02:00
|
|
|
with:
|
|
|
|
name: binary
|
|
|
|
|
|
|
|
- name: Test file for detected bits
|
|
|
|
id: detections
|
2022-07-30 18:23:20 +02:00
|
|
|
uses: yimura/gtav-sigscan-action@v0.0.3
|
2022-07-19 14:38:23 +02:00
|
|
|
with:
|
|
|
|
file: ./YimMenu.dll
|
|
|
|
|
|
|
|
- name: Notify on Discord
|
|
|
|
if: ${{ steps.detections.outputs.is_detected == 'true' }}
|
2022-11-11 12:34:32 +02:00
|
|
|
uses: tsickert/discord-webhook@v5.3.0
|
2022-07-19 14:38:23 +02:00
|
|
|
with:
|
|
|
|
webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }}
|
|
|
|
embed-title: YimMenu has been detected by the sigscanner!
|
|
|
|
embed-description: |
|
|
|
|
The following bits have been detected:
|
|
|
|
```yml
|
|
|
|
${{ steps.detections.outputs.detected_string }}
|
|
|
|
```
|
|
|
|
check_date:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
name: Check latest commit
|
|
|
|
needs: build_nightly
|
|
|
|
outputs:
|
|
|
|
should_run: ${{ steps.should_run.outputs.should_run }}
|
|
|
|
steps:
|
2022-11-11 12:34:32 +02:00
|
|
|
- uses: actions/checkout@v3
|
2022-07-19 14:38:23 +02:00
|
|
|
|
|
|
|
- id: should_run
|
|
|
|
continue-on-error: true
|
|
|
|
name: Check if latest commit date is within the previous 24 hours
|
|
|
|
if: ${{ github.event_name == 'schedule' }}
|
2022-11-11 12:34:32 +02:00
|
|
|
run: test -z $(git rev-list --after="24 hours" ${{ github.sha }}) && echo "should_run=false" >> $GITHUB_OUTPUT
|
2022-07-19 14:38:23 +02:00
|
|
|
|
2022-01-11 14:20:49 +01:00
|
|
|
create_release:
|
2022-01-11 13:42:01 +01:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
name: Create Release
|
2022-07-20 03:53:19 +02:00
|
|
|
needs: [ check_date, build_nightly ]
|
2022-07-19 14:38:23 +02:00
|
|
|
if: ${{ needs.check_date.outputs.should_run != 'false' }}
|
2022-01-11 13:42:01 +01:00
|
|
|
steps:
|
|
|
|
- name: Download Artifact
|
2022-11-11 12:34:32 +02:00
|
|
|
uses: actions/download-artifact@v3
|
2022-01-11 13:42:01 +01:00
|
|
|
with:
|
|
|
|
name: binary
|
|
|
|
|
|
|
|
- name: Echo build sha256
|
|
|
|
id: build_sha
|
|
|
|
run: |
|
2022-01-11 14:27:11 +01:00
|
|
|
sha256sum YimMenu.dll > sha256.checksum
|
2022-11-11 12:34:32 +02:00
|
|
|
echo "build_sha=$(cat sha256.checksum)" >> $GITHUB_OUTPUT
|
2022-01-11 13:42:01 +01:00
|
|
|
cat sha256.checksum
|
|
|
|
|
2022-01-11 16:23:27 +01:00
|
|
|
- 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 }}
|
|
|
|
|
2022-01-03 17:44:18 +01:00
|
|
|
- name: Nightly Release
|
|
|
|
uses: softprops/action-gh-release@v1
|
2022-01-03 17:19:03 +01:00
|
|
|
with:
|
2022-01-11 14:43:35 +01:00
|
|
|
name: Nightly [${{ needs.build_nightly.outputs.short_sha }}]
|
2022-01-11 14:07:40 +01:00
|
|
|
tag_name: nightly
|
2022-01-03 17:19:03 +01:00
|
|
|
body: |
|
2022-01-11 13:42:01 +01:00
|
|
|
**This release has been build by Github Actions**
|
|
|
|
[Link to build](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})
|
|
|
|
|
|
|
|
Build SHA256:
|
|
|
|
```
|
|
|
|
${{ steps.build_sha.outputs.build_sha }}
|
|
|
|
```
|
2022-01-11 16:56:44 +01:00
|
|
|
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.
|
2022-01-11 14:43:35 +01:00
|
|
|
|
2022-01-11 16:56:44 +01:00
|
|
|
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.
|
2022-01-11 14:43:35 +01:00
|
|
|
Build artifacts ARE NOT automatically the same as release assets since release assets can be modified afterwards.
|
|
|
|
|
2022-01-11 13:42:01 +01:00
|
|
|
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.
|
2022-01-11 16:56:44 +01:00
|
|
|
|
|
|
|
Full Commit Hash:
|
|
|
|
```
|
|
|
|
${{ needs.build_nightly.outputs.full_sha }}
|
|
|
|
```
|
2022-01-03 17:44:18 +01:00
|
|
|
files: |
|
2022-01-11 13:42:01 +01:00
|
|
|
YimMenu.dll
|