add artifact release to action #2
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
# This workflow will build a .NET project | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net | |
name: .NET | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 6.0.x | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Build for linux | |
run: dotnet publish -r win-x64 -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true --self-contained true --configuration Release | |
- name: Build for windows | |
run: dotnet publish -r linux-x64 -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true --self-contained true --configuration Release | |
- name: Build for macos | |
run: dotnet publish -r osx-x64 -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true --self-contained true --configuration Release | |
- name: Upload a Build Artifact | |
# upload artifacts | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: macOS release | |
path: TABGServer/bin/Debug/net7.0/osx-x64/publish/TABG | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: linux release | |
path: TABGServer/bin/Debug/net7.0/linux-x64/publish/TABG | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: windows release | |
path: TABGServer/bin/Debug/net7.0/win-x64/publish/TABG.exe |