-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (31 loc) · 987 Bytes
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Build Artifacts
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
os: [linux-x64,osx-x64,osx.11.0-arm64,win-x64]
dotnet-version: ['7.0']
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup .NET Core ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@v2
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Restore dependencies
run: dotnet restore
- name: Build application
run: dotnet build --configuration Release --output ./jihub-${{ matrix.os }}
- name: Publish application
run: dotnet publish --configuration Release --output ./jihub-${{ matrix.os }} --runtime ${{ matrix.os }}
- name: Archive artifacts
uses: actions/upload-artifact@v2
with:
name: jihub-${{ matrix.os }}
path: ./jihub-${{ matrix.os }}