Merge pull request #75 from BakaFT/feat/fs #169
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
on: | |
push: | |
branches: [main, dev] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: windows-2019 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.ref }} | |
submodules: true | |
- name: Prepare environment variables | |
run: | | |
echo "SHORT_SHA=$("${{ github.sha }}" | cut -c1-8)" >> $env:GITHUB_ENV | |
echo "APP_VERSION=$(((Get-Content loader\Version.cs) -Match '"(.+)"').Trim('"', ' '))" >> $env:GITHUB_ENV | |
- name: Update project files | |
run: | | |
(Get-Content core\core.vcxproj) -replace "Version>8.1", "Version>10.0.17763.0" | Out-File core\core.vcxproj | |
(Get-Content loader\Version.cs) -replace 'CommitSha1.*;', 'CommitSha1 = "${{ env.SHORT_SHA }}";' | Out-File loader\Version.cs | |
- name: Setup MSBuild | |
uses: microsoft/setup-msbuild@v1.1 | |
- name: Cache NuGet packages | |
uses: actions/cache@v3 | |
with: | |
path: ~/.nuget/packages | |
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }} | |
restore-keys: ${{ runner.os }}-nuget- | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: Build preload plugins | |
run: | | |
cd plugins | |
pnpm install | |
pnpm build | |
- name: Build solution | |
run: msbuild pengu-loader.sln /t:restore,build /m /p:Configuration=Release /p:Platform=x64 | |
- name: Upload build outputs | |
uses: actions/upload-artifact@v3 | |
with: | |
name: pengu-loader-v${{ env.APP_VERSION }}-beta-${{ env.SHORT_SHA }} | |
path: | | |
bin/*.exe | |
bin/*.dll |