Skip to content

Log important items from cleo config (#561) #4

Log important items from cleo config (#561)

Log important items from cleo config (#561) #4

Workflow file for this run

name: Release
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+**'
permissions:
contents: write
jobs:
Release:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
submodules: "recursive"
- name: Set up MsBuild
uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce # v2.0.0
- name: Read version tag
id: read_version
run: node.exe .github/workflows/version.js
- name: Core - Build
shell: cmd
run: |
@echo off
set PLUGIN_SDK_DIR=%GITHUB_WORKSPACE%\third-party\plugin-sdk
msbuild CLEO5.sln /property:Configuration=Release /property:Platform=GTASA /m /fileLogger1 /fileLoggerParameters1:warningsOnly;errorsOnly;logfile=output.log
node .github/workflows/analyze-build-log.js "Core compilation"
# - name: Core - Sign
# uses: x87/code-sign-action@develop
# with:
# certificate: '${{ secrets.DIG_KEY_CERT }}'
# password: '${{ secrets.DIG_KEY_PWD }}'
# certificatename: 'Seemann'
# description: 'CLEO 5'
# timestampUrl: 'http://timestamp.digicert.com'
# filename: './.output/Release/cleo.asi'
- name: Core - VirusTotal scan
id: scan_core
env:
vt_key: ${{secrets.VT_KEY}}
if: ${{env.vt_key != ''}}
uses: crazy-max/ghaction-virustotal@d34968c958ae283fe976efed637081b9f9dcf74f # v4.2.0
with:
vt_api_key: ${{ secrets.VT_KEY }}
files: './.output/Release/CLEO.asi'
- name: Core - VirusTotal log
if: steps.scan_core.outcome == 'success'
run: echo "::notice title=CLEO Core virus scan::${{steps.scan_core.outputs.analysis}}"
- name: Plugins - Build
shell: cmd
run: |
@echo off
set PLUGIN_SDK_DIR=%GITHUB_WORKSPACE%\third-party\plugin-sdk
msbuild cleo_plugins/CLEO_Plugins.sln /property:Configuration=Release /property:Platform=x86 /m /fileLogger1 /fileLoggerParameters1:warningsOnly;errorsOnly;logfile=output.log
node .github/workflows/analyze-build-log.js "Plugins compilation"
# - name: Plugins - Sign
# uses: x87/code-sign-action@develop
# with:
# certificate: '${{ secrets.DIG_KEY_CERT }}'
# password: '${{ secrets.DIG_KEY_PWD }}'
# certificatename: 'Seemann'
# description: 'CLEO 5 Plugin'
# timestampUrl: 'http://timestamp.digicert.com'
# folder: './cleo_plugins/.output'
- name: Plugins - VirusTotal scan
id: scan_plugins
env:
vt_key: ${{secrets.VT_KEY}}
if: ${{env.vt_key != ''}}
uses: crazy-max/ghaction-virustotal@d34968c958ae283fe976efed637081b9f9dcf74f # v4.2.0
with:
vt_api_key: ${{ secrets.VT_KEY }}
files: './cleo_plugins/.output/*.cleo'
- name: Plugins - VirusTotal log
if: steps.scan_plugins.outcome == 'success'
run: echo "::notice title=CLEO Core virus scan::${{steps.scan_plugins.outputs.analysis}}"
- name: Gather output files
shell: cmd
run: |
@echo Create directories
mkdir .output\Release\cleo
mkdir .output\Release\cleo\.config
mkdir .output\Release\cleo\cleo_modules
mkdir .output\Release\cleo\cleo_plugins
mkdir .output\Release\cleo\cleo_saves
mkdir .output\Release\cleo\cleo_text
mkdir .output\Release\cleo_readme
mkdir .output\Release\cleo_readme\examples
@echo Copy files
copy cleo_plugins\.output\*.cleo .output\Release\cleo\cleo_plugins
copy cleo_plugins\Audio\bass\bass.dll .output\Release\bass.dll
xcopy /E /I examples .output\Release\cleo_readme\examples
@echo Download Sanny Builder Library json
curl -fL https://raw.githubusercontent.com/sannybuilder/library/master/sa/sa.json -o .output\Release\cleo\.config\sa.json
curl -fL https://raw.githubusercontent.com/sannybuilder/library/master/sa/enums.json -o .output\Release\cleo\.config\enums.json
@echo Copy SDK
copy .output\Release\CLEO.lib cleo_sdk\CLEO.lib
- name: Convert Markdown to HTML
run: |
npm ci --prefix .github/workflows --ignore-scripts --no-audit --no-fund
node.exe .github/workflows/markdown.js
move README.html .output\Release\cleo_readme\Readme.html
move CHANGELOG.html .output\Release\cleo_readme\Changelog.html
- name: Download ASI Loaders
shell: cmd
run: |
@echo Copy files
xcopy /E /I .output\Release .output\Release_with_Silent_ASI_Loader
xcopy /E /I .output\Release .output\Release_with_Ultimate_ASI_Loader
@echo Install Silent's ASI Loader
curl -fL https://silent.rockstarvision.com/uploads/silents_asi_loader_13.zip -o silents_asi_loader_13.zip
powershell.exe -NoP -NonI -Command "$hash = (Get-FileHash '.\silents_asi_loader_13.zip' -Algorithm SHA256).Hash.ToLowerInvariant(); if ($hash -ne '12114d9e3cf604ace85093d2537b30567b02ca5f19022ffe322c4c2687e590a7') { throw 'Silent ASI Loader checksum mismatch' }"
powershell.exe -NoP -NonI -Command "Expand-Archive '.\silents_asi_loader_13.zip' '.\.output\Release_with_Silent_ASI_Loader'"
move .output\Release_with_Silent_ASI_Loader\ReadMe.txt ".output\Release_with_Silent_ASI_Loader\cleo_readme\ASI Loader Readme.txt"
rmdir /s /q .output\Release_with_Silent_ASI_Loader\advanced_plugin_management_example
rmdir /s /q .output\Release_with_Silent_ASI_Loader\scripts
@echo Install Ultimate ASI Loader
curl -fL https://github.com/cleolibrary/Ultimate-ASI-Loader/releases/download/v9.7.0/vorbisFile-Win32.zip -o ual.zip
powershell.exe -NoP -NonI -Command "$hash = (Get-FileHash '.\ual.zip' -Algorithm SHA256).Hash.ToLowerInvariant(); if ($hash -ne '623b1592d5fae767c06c47b77e6ec01b23dc452e7116dba5f1af2c7cbdf4d800') { throw 'Ultimate ASI Loader checksum mismatch' }"
powershell.exe -NoP -NonI -Command "Expand-Archive '.\ual.zip' '.\.output\Release_with_Ultimate_ASI_Loader'"
rm .\.output\Release_with_Ultimate_ASI_Loader\vorbisFile-Win32.SHA512
- name: Pack archive - CLEO
uses: ThirteenAG/zip-release@a24011d8d445e4da5935a7e73c1f98e22a439464 # master
with:
path: ./.output/Release/*
type: "zip"
filename: SA.CLEO-${{ github.ref_name }}.zip
exclusions: "*.pdb *.lib *.exp"
- name: Pack archive - CLEO + Silent's ASI Loader
uses: ThirteenAG/zip-release@a24011d8d445e4da5935a7e73c1f98e22a439464 # master
with:
path: ./.output/Release_with_Silent_ASI_Loader/*
type: "zip"
filename: SA.CLEO-${{ github.ref_name }}+Silent_ASI_Loader.zip
exclusions: "*.pdb *.lib *.exp"
- name: Pack archive - CLEO + UAL
uses: ThirteenAG/zip-release@a24011d8d445e4da5935a7e73c1f98e22a439464 # master
with:
path: ./.output/Release_with_Ultimate_ASI_Loader/*
type: "zip"
filename: SA.CLEO-${{ github.ref_name }}+Ultimate_ASI_Loader.zip
exclusions: "*.pdb *.lib *.exp"
- name: Pack archive - CLEO SDK
uses: ThirteenAG/zip-release@a24011d8d445e4da5935a7e73c1f98e22a439464 # master
with:
path: ./cleo_sdk/*
type: "zip"
filename: SA.CLEO_SDK-${{ github.ref_name }}.zip
exclusions: "*.pdb *.exp"
- name: Create release
uses: ncipollo/release-action@440c8c1cb0ed28b9f43e4d1d670870f059653174 # v1.16.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: ${{ steps.read_version.outputs.version }}
bodyFile: 'changes.txt' # generated in read_version
tag: ${{ github.ref_name }}
prerelease: ${{ contains(github.ref_name, 'beta') || contains(github.ref_name, 'alpha') }}
artifacts: "SA.CLEO*.zip"
allowUpdates: true