Skip to content

build-release

build-release #15

Workflow file for this run

name: build-release
on: [workflow_dispatch]
jobs:
create_release:
runs-on: windows-2019
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get version
id: version
run: |
$m = Select-String -path Source\Properties\AssemblyInfo.cs 'AssemblyVersion\(\"([\d\.]+)\"\)'
echo "version=$($m.Matches.Groups[1].Value)" >> $env:GITHUB_OUTPUT
echo "version_sanitized=$($m.Matches.Groups[1].Value.Replace('.','_'))" >> $env:GITHUB_OUTPUT
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v2
- name: Setup Nuget
uses: Nuget/setup-nuget@v2
- name: Restore Nuget packages
run: nuget restore .\Source\Conduit.sln
- name: Build Release
run: msbuild .\Source\Conduit.sln /t:build /p:Configuration=Release
- name: Create NSIS installer
uses: joncloud/[email protected]
with:
script-file: ./Source/bin/Release/Conduit.nsi
- name: Rename installer
run: |
Rename-Item -Path ./Source/bin/Release/conduit_setup.exe -NewName conduit_setup_${{ steps.version.outputs.version_sanitized }}.exe
- name: Create and Upload Release
uses: softprops/action-gh-release@v1
with:
name: v${{ steps.version.outputs.version }}
tag_name: v${{ steps.version.outputs.version }}
draft: true
files: ./Source/bin/Release/conduit_setup_${{ steps.version.outputs.version_sanitized }}.exe