-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (52 loc) · 1.85 KB
/
build-publish.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
name: Deploy
on:
workflow_run:
workflows: ["Prepare"]
types:
- completed
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: false
default: 'warning'
env: # https://docs.github.com/en/actions/learn-github-actions/environment-variables
BUILD_CONFIG: Release
DOTNET_VER: 8.0.x
INCLUDE_PRERELEASE: false
jobs:
build:
name: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DOTNET_VER }}
include-prerelease: ${{ env.INCLUDE_PRERELEASE }}
- name: Restore dependencies
run: dotnet restore /property:Configuration=${{ env.BUILD_CONFIG }}
- name: Build
run: dotnet build --configuration ${{ env.BUILD_CONFIG }} --no-restore
# - name: Test
# run: dotnet test ActorSrcGen.Playground.Tests --configuration ${{ env.BUILD_CONFIG }} --no-restore --no-build --verbosity normal
# - name: Push generated package to GitHub registry
# run: dotnet nuget push ./**/*.nupkg -k ${{ secrets.NUGET_PUBLISH }} -s https://api.nuget.org/v3/index.json --skip-duplicate
src-gen:
name: src-gen
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DOTNET_VER }}
include-prerelease: ${{ env.INCLUDE_PRERELEASE }}
- name: Restore dependencies
run: dotnet restore /property:Configuration=Gen
- name: Build
run: dotnet build --configuration Gen --no-restore
- name: Push generated package to GitHub registry
run: dotnet nuget push ./**/*.nupkg -k ${{ secrets.NUGET_PUBLISH }} -s https://api.nuget.org/v3/index.json --skip-duplicate