Update release.yml #18
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: Create release | |
on: | |
push: | |
tags: | |
- "v*" | |
permissions: | |
contents: write | |
jobs: | |
release: | |
runs-on: windows-latest # For a list of available runner types, refer to | |
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
# Install the .NET Core workload | |
- name: Install .NET Core | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Set up a Rust toolchain | |
uses: hecrj/[email protected] | |
# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild | |
- name: Setup MSBuild.exe | |
uses: microsoft/setup-msbuild@v2 | |
- name: Update version in code | |
uses: actions/[email protected] | |
with: | |
Script: src/updateVersion.ps1 ${GITHUB_REF#refs/*/} | |
# Execute all unit tests in the solution | |
- name: Execute unit tests | |
run: dotnet test src -c Release -p:Platform=x64 | |
# Build | |
- name: Build the application | |
run: dotnet build src\PPM.InstallerBundle\PPM.InstallerBundle.wixproj -c Release -p:Platform=x64 -o src\Release | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: src/Release/*Setup*.exe | |
fail_on_unmatched_files: true | |
prerelease: true | |
generate_release_notes: true | |