Skip to content

Update dotnet.yml

Update dotnet.yml #10

Workflow file for this run

name: Build and Release
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: '8.x'
- name: Install dependencies
run: dotnet restore ./src/MulticlientCreator/MulticlientCreator.sln
- name: Build
run: dotnet build ./src/MulticlientCreator/MulticlientCreator.sln --configuration Release --no-restore
- name: Run tests
run: dotnet test ./src/MulticlientCreator/MulticlientCreator.sln --no-restore --verbosity normal
release:
runs-on: windows-latest
needs: build
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: '8.x'
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v1.0.0
release_name: Release v1.0.0
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./src/MulticlientCreator/bin/Release/net8.0-windows/MulticlientCreator.exe
asset_name: MulticlientCreator.exe
asset_content_type: application/octet-stream