-
Notifications
You must be signed in to change notification settings - Fork 4
78 lines (67 loc) · 2.06 KB
/
deploy.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
73
74
75
76
77
78
name: Deploy
on:
push:
tags:
- "v*"
env:
nuget: "https://api.nuget.org/v3/index.json"
authors: ArchLeaders
description: |-
Generic library for creating extensible config arrangements to be used with a UI builder
readme: ./Readme.md
repo: https://github.com/ArchLeaders/ConfigFactory
spdx: AGPL-3.0-or-later
tags: configuration;settings;avaloniaui;factory
jobs:
deploy:
name: Deploy ${{ matrix.config.name }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
config:
- name: ConfigFactory
- name: ConfigFactory.Core
- name: ConfigFactory.Avalonia
env:
csproj: src/${{ matrix.config.name }}/${{ matrix.config.name }}.csproj
bin: src/${{ matrix.config.name }}/bin
steps:
- name: "Checkout"
uses: actions/checkout@v2
- name: "Install DotNET"
uses: actions/setup-dotnet@v1
with:
dotnet-version: "7.0.x"
- name: "Restore packages"
run: dotnet restore ${{ env.csproj }}
- name: "Build project"
shell: bash
run: |
dotnet build ${{ env.csproj }} \
-c Release \
--no-restore
- name: "Get Version"
id: version
uses: battila7/get-version-action@v2
- name: "Pack project"
shell: bash
run: |
dotnet pack ${{ env.csproj }} \
--no-restore \
-c Release \
-o ${{ env.bin }} \
-p:Authors="${{ env.authors }}" \
-p:Description="${{ env.description }}" \
-p:PackageLicenseExpression="${{ env.spdx }}" \
-p:PackageProjectUrl="${{ env.repo }}" \
-p:PackageReadmeFile="${{ env.readme }}" \
-p:PackageTags='"${{ env.tags }}"' \
-p:PackageVersion="${{ steps.version.outputs.version-without-v }}" \
-p:RepositoryUrl="${{ env.repo }}" \
- name: "Push package"
shell: bash
run: |
dotnet nuget push ${{ env.bin }}/*.nupkg \
-k ${{ secrets.nuget_auth }} \
-s ${{ env.nuget }}