Merge pull request #172 from OneIdentity/upgrade-net8.0 #16
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 | |
on: | |
push: | |
tags: | |
- 'v[0-9]+.[0-9]+.[0-9]+*' # Push events to any matching semantic tag. For example, v1.10.1 or v2.0.0. | |
jobs: | |
release: | |
strategy: | |
matrix: | |
configuration: [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 | |
env: | |
Solution_Name: LogInsights.sln # Replace with your solution name, i.e. MyWpfApp.sln. | |
Project_Dir: LogInsights | |
Zip_Name: LogInsights | |
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 | |
# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild | |
- name: Setup MSBuild.exe | |
uses: microsoft/[email protected] | |
# Restore the application to populate the obj folder with RuntimeIdentifiers | |
- name: Restore the application | |
run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration | |
env: | |
Configuration: ${{ matrix.configuration }} | |
# Build the application | |
- name: Build the application | |
run: 'msbuild $env:Solution_Name /p:Configuration=$env:Configuration /p:PublishProfile=x64Profile /p:OutputPath=bin/Publish/x64/${{ env.Zip_Name }} /t:"Build;Publish"' | |
env: | |
Configuration: ${{ matrix.configuration }} | |
# https://github.com/marketplace/actions/zip-release | |
- name: Create a ZIP file | |
uses: thedoctor0/zip-release@master | |
with: | |
type: zip | |
filename: ${{ env.Zip_Name }}.zip | |
directory: ${{ env.Project_Dir }}/bin/Publish/x64 | |
path: ${{ env.Zip_Name }} | |
# Create an automatic changelog | |
- name: Build changelog | |
id: build_changelog | |
uses: mikepenz/release-changelog-builder-action@main | |
# with: | |
# configuration: 'release-changelog-builder-config.json' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# # Create the release | |
# - name: Create release | |
# id: create_release | |
# uses: actions/create-release@latest | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | |
# with: | |
# tag_name: ${{ github.ref }} | |
# release_name: Release ${{ github.ref }} | |
# body: ${{steps.build_changelog.outputs.changelog}} | |
# draft: true | |
# prerelease: true | |
# # And upload the ZIP into the release | |
# - name: Upload ZIP | |
# uses: actions/upload-release-asset@v1 | |
# env: | |
# GITHUB_TOKEN: ${{ github.token }} | |
# with: | |
# upload_url: ${{ steps.create_release.outputs.upload_url }} | |
# asset_path: ${{ env.Project_Dir }}/bin/Publish/x64/${{ env.Zip_Name }}.zip | |
# asset_name: ${{ env.Zip_Name }}.zip | |
# asset_content_type: application/zip | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
draft: true | |
prerelease: true | |
body: ${{steps.build_changelog.outputs.changelog}} | |
files: ${{ env.Project_Dir }}/bin/Publish/x64/${{ env.Zip_Name }}.zip |