feat(log): limit to 10KB #158
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: [ master, staging ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
configuration: [Release] | |
runs-on: windows-latest | |
env: | |
Thirdparty_ACT: https://github.com/EQAditu/AdvancedCombatTracker/releases/download/3.6.0.275/ACTv3.zip | |
Thirdparty_FFXIV_ACT_Plugin: https://github.com/ravahn/FFXIV_ACT_Plugin/raw/master/Releases/FFXIV_ACT_Plugin_SDK_2.0.7.0.zip | |
Solution_Name: Cafe.Matcha.sln | |
Secret_Path: Cafe.Matcha\Constant\Secret.Local.cs | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.nuget/packages | |
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} | |
restore-keys: | | |
${{ runner.os }}-nuget- | |
- name: Setup NuGet.exe for use with actions | |
uses: NuGet/setup-nuget@v2 | |
- name: Setup MSBuild.exe | |
uses: microsoft/setup-msbuild@v2 | |
- name: Setup thirdparty dependencies | |
run: | | |
nuget restore ${{ env.Solution_Name }} | |
New-Item -Name "thirdparty" -ItemType "directory" -Force | |
Invoke-WebRequest -Uri ${{ env.Thirdparty_ACT }} -OutFile thirdparty\ACT.zip | |
Expand-Archive thirdparty\ACT.zip -DestinationPath thirdparty\ACT -Force | |
Invoke-WebRequest -Uri ${{ env.Thirdparty_FFXIV_ACT_Plugin }} -OutFile thirdparty\FFXIV_ACT_Plugin.zip | |
Expand-Archive thirdparty\FFXIV_ACT_Plugin.zip -DestinationPath thirdparty\FFXIV_ACT_Plugin -Force | |
Get-ChildItem .\thirdparty | |
Get-ChildItem .\thirdparty\ACT | |
Get-ChildItem .\thirdparty\FFXIV_ACT_Plugin | |
- name: Write Secrets | |
run: | | |
$secret_content = [System.Convert]::FromBase64String("${{ secrets.CONSTANT_SECRET_LOCAL }}") | |
[IO.File]::WriteAllBytes("${{ env.Secret_Path }}", $secret_content) | |
- name: Build | |
run: msbuild $env:Solution_Name /p:Configuration=$env:Configuration | |
env: | |
Configuration: ${{ matrix.configuration }} | |
- name: Remove Secrets | |
run: Remove-Item -path ${{ env.Secret_Path }} | |
- name: Upload build artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Bundle | |
path: bin\*.zip | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: bin\*.zip | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Telegram Notify | |
shell: bash | |
run: | | |
export FILENAME=`cd bin && ls *.zip` | |
curl -X POST -F chat_id=${{ secrets.TELEGRAM_CHAT }} -F "document=@\"bin/${FILENAME}\"" https://api.telegram.org/bot${{ secrets.TELEGRAM_TOKEN }}/sendDocument |