Bump action to .NET 9 #51
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: .NET | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
create_release: | |
name: Create Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Create Release | |
id: create_release | |
uses: softprops/[email protected] | |
with: | |
name: ${{ github.ref_name }} | |
draft: false | |
prerelease: false | |
generate_release_notes: false | |
build: | |
name: Build Release | |
needs: create_release | |
strategy: | |
matrix: | |
kind: ['linux', 'windows', 'macOS'] | |
include: | |
- kind: linux | |
os: ubuntu-latest | |
target: linux-x64 | |
- kind: windows | |
os: windows-latest | |
target: win-x64 | |
- kind: macOS | |
os: macos-latest | |
target: osx-x64 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 9.0.x | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet publish -c Release -r ${{ matrix.target }} --self-contained -f net9.0 | |
- name: Test | |
run: dotnet test --no-build --verbosity normal | |
- name: Archive Release | |
uses: thedoctor0/zip-release@main | |
with: | |
directory: ${{ github.workspace }}/bin/Release/net9.0/${{ matrix.target }}/publish | |
type: 'zip' | |
filename: ${{ github.workspace }}/Release-${{ matrix.target }}.zip | |
- name: Release | |
uses: softprops/[email protected] | |
with: | |
files: ${{ github.workspace }}/Release-${{ matrix.target }}.zip |