1.0.0 #16
Workflow file for this run
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-cpp | |
on: | |
push: | |
paths: | |
- 'AnnictRecorder/**' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: windows-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: | |
- x64 | |
- x86 | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Setup MSBuild | |
uses: microsoft/setup-msbuild@v1 | |
- name: Setup vcpkg | |
uses: lukka/run-vcpkg@v11 | |
with: | |
runVcpkgInstall: true | |
vcpkgGitCommitId: 2b1757dd1d5ed7d9d5bb65fd8316631b157e7afc | |
env: | |
VCPKG_DEFAULT_TRIPLET: ${{ matrix.platform }}-windows | |
- name: Install MSBuild integration | |
shell: powershell | |
run: vcpkg integrate install | |
env: | |
VCPKG_DEFAULT_TRIPLET: ${{ matrix.platform }}-windows | |
- name: MSBuild | |
run: msbuild TVTestAnnictRecorder.sln -property:Configuration="Release" -property:Platform="${{ matrix.platform }}" -m -maxcpucount | |
env: | |
VCPKG_DEFAULT_TRIPLET: ${{ matrix.platform }}-windows | |
- name: Prepare Artifacts | |
shell: powershell | |
run: | | |
New-Item -Path Artifacts -ItemType Directory | |
New-Item -Path Artifacts/Plugins -ItemType Directory | |
Copy-Item -Path ${{ matrix.platform }}/Release/AnnictRecorder.tvtp -Destination Artifacts/Plugins/ | |
Copy-Item -Path ${{ matrix.platform }}/Release/*.dll -Destination Artifacts/ | |
Copy-Item -Path AnnictRecorder.ini -Destination Artifacts/Plugins/ | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: AnnictRecorder_${{ matrix.platform }} | |
if-no-files-found: error | |
path: Artifacts/ | |
- name: Create Release | |
shell: powershell | |
if: startsWith(github.ref, 'refs/tags/') | |
run: Compress-Archive -Path Artifacts/* -DestinationPath AnnictRecorder_${{ matrix.platform }}.zip | |
- name: Upload Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: AnnictRecorder_${{ matrix.platform }}.zip | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |