forked from maxilevi/MeshOptimizer.NET
-
Notifications
You must be signed in to change notification settings - Fork 1
64 lines (54 loc) · 1.73 KB
/
Copy pathci.yml
File metadata and controls
64 lines (54 loc) · 1.73 KB
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
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
strategy:
matrix:
include:
- os: ubuntu
rid: linux
- os: macos
rid: osx
- os: windows
rid: win
runs-on: ${{ matrix.os }}-latest
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
- name: Download workflow artifact
uses: dawidd6/action-download-artifact@v2.14.0
with:
repo: StirlingLabs/meshoptimizer
workflow: build.yml
branch: shared-lib-action
path: runtimes/${{ matrix.rid }}-x64/native
name: meshoptimizer-${{ matrix.rid }}
- name: Windows Artifact Fixup
if: ${{ matrix.os == 'windows' }}
run: mv runtimes/win-x64/native/Release/meshoptimizer.dll runtimes/win-x64/native/meshoptimizer.dll
- name: Remove Header Artifact
shell: bash
run: rm -rf runtimes/${{ matrix.rid }}-x64/native/src
- name: Build
run: dotnet build -c Release
- name: Test
run: dotnet test --no-build --verbosity normal -c Release --logger GitHubActions
- name: Upload NuPkg Artifact
if: ${{ matrix.os == 'ubuntu' }}
uses: actions/upload-artifact@v2.2.3
with:
name: NuPkg
path: MeshOptimizer/bin/Release/*.nupkg
- name: Publish NuPkg on GitHub
if: ${{ matrix.os == 'ubuntu' }}
run: dotnet nuget push MeshOptimizer/bin/Release/*.nupkg -k ${{github.token}} -s https://nuget.pkg.github.com/${{github.repository_owner}}/index.json -n 1 --skip-duplicate