-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (49 loc) · 1.66 KB
/
ci.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
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
configuration: [Debug, Release]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3
- uses: actions/setup-node@v3
with:
node-version: lts/*
- name: Build and test
shell: pwsh
run: ./build-and-test.ps1 -configuration ${{ matrix.configuration }}
- name: Publish WASM artifact
uses: actions/upload-artifact@v3
if: matrix.os == 'windows-latest' && matrix.configuration == 'Release'
with:
name: wasm
path: ./artifacts/wasm/wwwroot
per-build-publish:
if: github.ref == 'refs/heads/main'
needs: [build]
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3
- uses: actions/setup-node@v3
with:
node-version: lts/*
- run: .\create-version-suffix.ps1
- run: .\build-and-test.ps1 -configuration Release -notest -versionSuffix ${{ env.VERSION_SUFFIX }}
- run: dotnet nuget push .\artifacts\packages\Release\*.nupkg -s https://nuget.pkg.github.com/ixmilia/index.json -k ${{ secrets.GITHUB_TOKEN }}
nuget-publish:
if: startsWith(github.ref, 'refs/tags/v')
needs: [build]
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v3
- uses: actions/setup-node@v3
with:
node-version: lts/*
- run: .\build-and-test.ps1 -configuration Release -notest
- run: dotnet nuget push .\artifacts\packages\Release\*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }}