-
Notifications
You must be signed in to change notification settings - Fork 91
72 lines (57 loc) · 1.68 KB
/
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Build
on:
push:
branches:
- master
# repository_dispatch:
# types: [build]
workflow_dispatch:
jobs:
buildAndUnitTest:
strategy:
matrix:
os: [ windows-latest, ubuntu-latest, macos-latest ]
fail-fast: false
runs-on: ${{ matrix.os }}
env:
SOLUTION_PATH: 'src/Blockcore.sln'
BUILD_CONFIGURATION: 'Release'
steps:
- uses: actions/checkout@v2
name: Checkout
- name: Setup dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: |
9.0.x
- name: Setup Node.js (16.x)
uses: actions/setup-node@v1
with:
node-version: 18
- name: Variables
run: |
echo VERSION=$(npm run version --silent) >> $GITHUB_ENV
shell: bash
- name: Unit Test
continue-on-error: true
run: |
dotnet nuget locals all --clear
dotnet test -v=normal --filter "FullyQualifiedName!~IntegrationTests&Unstable!=True" -c ${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_PATH}}
- name: Nuget Pack
run: dotnet pack --configuration ${{env.BUILD_CONFIGURATION}} --output "${{github.workspace}}/package/" ${{env.SOLUTION_PATH}}
- uses: actions/upload-artifact@v3
with:
name: Blockcore-${{env.VERSION}}-${{matrix.os}}-preview
path: "${{github.workspace}}/package/"
- name: Release
if: matrix.os == 'ubuntu-latest'
uses: sondreb/action-release@main
with:
commit: 'master'
token: ${{ secrets.GITHUB_TOKEN }}
folder: "${{github.workspace}}/package/"
draft: true
prerelease: false
body: ''
name: "Blockcore ${{env.VERSION}}"
tag: ${{env.VERSION}}