Create build.yml
This commit is contained in:
parent
d91916d785
commit
e876fef15f
1 changed files with 41 additions and 0 deletions
41
.github/workflows/build.yml
vendored
Normal file
41
.github/workflows/build.yml
vendored
Normal file
|
@ -0,0 +1,41 @@
|
|||
name: .NET Build
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build on ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest]
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
mono-version: 'latest'
|
||||
runtime: 'linux-x64'
|
||||
- os: windows-latest
|
||||
vs-version: 'latest'
|
||||
runtime: 'win-x64'
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up .NET
|
||||
uses: actions/setup-dotnet@v3
|
||||
with:
|
||||
dotnet-version: '8.x'
|
||||
|
||||
- name: Restore dependencies
|
||||
run: dotnet restore
|
||||
|
||||
- name: Build self-contained application
|
||||
run: dotnet publish --no-restore --configuration Release --self-contained -r ${{ matrix.runtime }} /p:PublishSingleFile=false
|
||||
|
||||
- name: Upload build artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: self-contained-${{ matrix.runtime }}
|
||||
path: |
|
||||
**/bin/Release/net8.0/${{ matrix.runtime }}/publish/
|
Loading…
Add table
Add a link
Reference in a new issue