use cache #27
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: .NET Framework Build | |
on: | |
push: | |
tags: | |
- '*' | |
branches-ignore: | |
- "dotnet6" | |
pull_request: | |
branches: | |
- '*' | |
jobs: | |
build: | |
strategy: | |
matrix: | |
include: | |
- msbuild_target: x64 | |
lowercase_target: x64 | |
crossbuild_target: x86_x64 | |
- msbuild_target: x86 | |
lowercase_target: x86 | |
crossbuild_target: x86 | |
- msbuild_target: ARM64 | |
lowercase_target: arm64 | |
crossbuild_target: x86_arm64 | |
env: | |
TARGET_PLATFORM: ${{ matrix.msbuild_target }} | |
runs-on: windows-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
show-progress: false | |
- name: Add msbuild to PATH | |
uses: microsoft/setup-msbuild@v2 | |
# Build libwebp | |
- name: Checkout libwebp | |
shell: cmd | |
run: | | |
mkdir libwebp\\${{ matrix.msbuild_target }}build | |
git clone -b 1.4.0 https://github.com/webmproject/libwebp.git libwebp-140 | |
ls | |
cd libwebp-140 | |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" ${{ matrix.crossbuild_target }} | |
nmake /f Makefile.vc CFG=release-dynamic RTLIBCFG=dynamic ARCH=${{ matrix.lowercase_target }} OBJDIR=output | |
cp output/release-dynamic/${{ matrix.lowercase_target }}/bin/*.dll ../libwebp/${{ matrix.lowercase_target }}build/ | |
# Restore NuGet packages | |
- name: Restore NuGet packages | |
run: nuget restore | |
# Build the solution | |
- name: Build | |
run: msbuild /p:Configuration=Release /p:Platform="${{ matrix.lowercase_target }}" /p:TargetFrameworkVersion=v4.6.2 mvlView.sln | |
# Publish the artifacts | |
- name: Publish Artifact | |
if: success() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: MvlView_${{ matrix.lowercase_target }}_net462 | |
path: mvlView/bin/${{ matrix.lowercase_target }}/Release | |
release: | |
if: startsWith(github.ref, 'refs/tags/v') | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download from Github | |
uses: actions/cache@v4 | |
with: | |
path: assets | |
- name: Release to Github | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
assets/* |