Auto save to file on write to rio. #76
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: | |
- "2024" | |
- "2023" | |
release: | |
types: | |
- created | |
jobs: | |
build: | |
strategy: | |
matrix: | |
configuration: [Release] | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install .NET Core | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 6.0.x | |
- name: setup-msbuild | |
uses: microsoft/setup-msbuild@v2 | |
- name: Set VS.net environment | |
run: cmd.exe /C CALL "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars32.bat" | |
- name: Build VSTO | |
run: msbuild ${{github.workspace}}\Motion-Profile-Mapper\Motion-Profile-Mapper.sln -t:restore,build -p:RestorePackagesConfig=true /p:Platform="Any CPU" /p:Configuration=${{ matrix.configuration }} /nologo /nr:false /p:VisualStudioVersion="19.0" | |
- name: Setup VS Dev Environment | |
uses: seanmiddleditch/gha-setup-vsdevenv@v4 | |
- name: DisableOutOfProc Fix | |
run: | | |
function Invoke-DisableOutOfProcBuild { | |
param (); | |
$visualStudioWherePath = ('{0}/Microsoft Visual Studio/Installer/vswhere.exe' -f ${Env:ProgramFiles(x86)}); | |
$visualStudioInstallationPath = & $visualStudioWherePath -latest -products 'Microsoft.VisualStudio.Product.Enterprise' -property 'installationPath'; | |
$currentWorkingDirectory = ('{0}/Common7/IDE/CommonExtensions/Microsoft/VSI/DisableOutOfProcBuild' -f $visualStudioInstallationPath); | |
Set-Location -Path $currentWorkingDirectory; | |
$disableOutOfProcBuildPath = ('{0}/DisableOutOfProcBuild.exe' -f $currentWorkingDirectory); | |
& $disableOutOfProcBuildPath; | |
return; | |
} | |
Invoke-DisableOutOfProcBuild | |
- name: Build installer | |
run: cd ${{github.workspace}}\Motion-Profile-Mapper\ && devenv.com ${{github.workspace}}\Motion-Profile-Mapper\Motion-Profile-Mapper-Installer\Motion-Profile-Mapper-Installer.vdproj /build "${{ matrix.configuration }}|Any CPU" | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: Motion-Profiler-Installer.msi | |
path: ${{github.workspace}}\Motion-Profile-Mapper\Motion-Profile-Mapper-Installer\${{ matrix.configuration }}\Motion-Profiler-Installer.msi | |
release: | |
needs: [build] | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Download installer artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: Motion-Profiler-Installer.msi | |
- name: Set Tag | |
id: set_tag | |
run: echo "::set-output name=tag::${{ github.event_name == 'push' && (github.ref == 'refs/heads/2024' || github.ref == 'refs/heads/2023') && 'Dev' || 'v' }}" | |
- name: Push to Tag | |
uses: pyTooling/Actions/releaser@r0 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
tag: ${{ steps.set_tag.outputs.tag }} | |
rm: true | |
files: | | |
**/*.msi | |
if: github.event_name == 'push' || github.event_name == 'release' | |
- name: Upload release assets | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
**/*.msi | |
if: github.event_name == 'release' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |