Merge pull request #7 from SlashNephy/renovate/actions-checkout-4.x #72
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: latest | |
on: | |
push: | |
paths-ignore: | |
- '*.md' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: windows-2022 | |
strategy: | |
matrix: | |
platform: | |
- x64 | |
- x86 | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Setup MSBuild | |
uses: microsoft/setup-msbuild@v2 | |
- name: Setup vcpkg | |
uses: lukka/run-vcpkg@v7 | |
with: | |
setupOnly: true | |
vcpkgGitCommitId: d8d61c941c333a147edffdcbdc9964dc0c0962f5 | |
vcpkgTriplet: ${{ matrix.platform }}-windows | |
appendedCacheKey: ${{ hashFiles( '**/vcpkg.json' ) }} | |
- name: Install MSBuild integration | |
shell: powershell | |
run: vcpkg integrate install | |
- name: MSBuild | |
run: msbuild TvTestRPC.sln -property:Configuration="Release" -property:Platform="${{ matrix.platform }}" -m | |
- 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/TvTestRPC.tvtp -Destination Artifacts/Plugins/ | |
Copy-Item -Path ${{ matrix.platform }}/Release/*.dll -Destination Artifacts/ | |
Copy-Item -Path TvTestRPC.ini -Destination Artifacts/Plugins/ | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: TvTestRPC_${{ 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 TvTestRPC_${{ matrix.platform }}.zip | |
- name: Upload Release | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: TvTestRPC_${{ matrix.platform }}.zip | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |