Release stable version #28
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: Release stable version | |
on: | |
push: | |
tags: | |
- 'v[0-9]+.[0-9]+.[0-9]+' | |
- 'v[0-9]+.[0-9]+.[0-9]+-beta[0-9]+' | |
workflow_dispatch: | |
jobs: | |
release: | |
runs-on: windows-latest | |
env: | |
Solution_Name: src\Backup Service Home 3.sln | |
Test_Project_Path: src\BSH.Test\BSH.Test.csproj | |
steps: | |
- name: Set env | |
run: | | |
$version = "${{ github.ref_name }}".substring(1) | |
$info_version = $version.replace('-beta', '.') | |
echo "BUILD_VERSION=$version" >> $env:GITHUB_ENV | |
echo "INFO_VERSION=$info_version" >> $env:GITHUB_ENV | |
- name: Setup dotnet | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 7.0.305 | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Build the application | |
run: | | |
dotnet publish -c Release -o ../output -a x64 --self-contained /p:Version=$env:BUILD_VERSION /p:FileVersion=$env:INFO_VERSION | |
working-directory: ./src | |
- name: Building the installer | |
run: | | |
iscc.exe tools\setup\Setup.iss /DApplicationVersion=$env:BUILD_VERSION /DApplicationInfoVersion=$env:INFO_VERSION | |
- name: Release to Github | |
uses: softprops/[email protected] | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
${{runner.workspace}}/bsh3/tools/setup/output/backupservicehome-${{ env.BUILD_VERSION }}.exe |