Merge pull request #195 from Ra-Workspace/cn/6.58 #200
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: Regenerate resource files | |
on: | |
push: | |
branches: [ master ] | |
workflow_dispatch: | |
jobs: | |
build_and_regenerate: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
ref: master | |
- name: Setup Nuget.exe | |
uses: NuGet/setup-nuget@v1.0.5 | |
- name: Install dependencies | |
run: nuget restore | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 3.1.301 | |
- name: Build | |
run: dotnet build --configuration Release --no-restore | |
- name: Generate opcode store | |
run: | | |
cd FFXIVOpcodes/bin/Release/netcoreapp3.1/ | |
./FFXIVOpcodes.exe | |
- name: Generate constants store | |
run: | | |
cd FFXIVConstants/bin/Release/netcoreapp3.1/ | |
./FFXIVConstants.exe | |
- name: Commit new files | |
run: | | |
git config --global user.email "noreply@example.com" | |
git config --global user.name "Automated Data Update" | |
git commit -a -m "Generate data stores" | |
git push | |
- name: Purge jsdelivr cache | |
run: | | |
Invoke-RestMethod ` | |
-Method 'Post' ` | |
-Uri https://purge.jsdelivr.net/ ` | |
-Headers @{ ` | |
"cache-control" = "no-cache"; ` | |
"content-type" = "application/json"; ` | |
} ` | |
-TimeoutSec 10 ` | |
-Body '{ "path": [ "/gh/karashiiro/FFXIVOpcodes@latest/opcodes.min.json", "/gh/karashiiro/FFXIVOpcodes@latest/constants.min.json" ] }' |