-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
53 additions
and
10 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,66 @@ | ||
name: .NET | ||
name: Build and Release | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
branches: | ||
- main | ||
pull_request: | ||
branches: [ "main" ] | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: windows-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v3 | ||
uses: actions/setup-dotnet@v2 | ||
with: | ||
dotnet-version: 8.0.x | ||
- name: Restore dependencies | ||
run: dotnet restore | ||
dotnet-version: '8.x' | ||
|
||
- name: Install dependencies | ||
run: dotnet restore ./src/MulticlientCreator/MulticlientCreator.sln | ||
|
||
- name: Build | ||
run: dotnet build --no-restore --configuration Release | ||
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 |