-
Notifications
You must be signed in to change notification settings - Fork 11
43 lines (37 loc) · 1.22 KB
/
dotnet.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
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: CI
on:
push:
branches: [ "main", "develop" ]
tags:
- 'v*.*.*'
pull_request:
branches: [ "main", "develop" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 9.0.x
#- name: Install workloads
# run: dotnet workload install android ios maccatalyst tvos macos maui wasm-tools
- name: Restore dependencies
run: dotnet restore
working-directory: src/AvaloniaInside.Shell
- name: Build
run: dotnet build -c Release --no-restore
working-directory: src/AvaloniaInside.Shell
#- name: Test
# run: dotnet test --no-build --verbosity normal
# push nuget package if it's a tag push
- name: Push NuGet package
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
files: src/AvaloniaInside.Shell/bin/Release/AvaloniaInside.Shell.*.nupkg
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}