-
-
Notifications
You must be signed in to change notification settings - Fork 7
86 lines (73 loc) · 2.3 KB
/
build.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
79
80
81
82
83
84
85
86
# Builds and runs tests in all three supported OSes
# Pushes CI feed if secrets.SLEET_CONNECTION is provided
name: build
on:
workflow_dispatch:
push:
branches: [ main, dev, 'feature/*', 'rel/*' ]
paths-ignore:
- docs/**/*
- changelog.md
pull_request:
types: [opened, synchronize, reopened]
env:
DOTNET_NOLOGO: true
Configuration: Release
VersionPrefix: 42.42.${{ github.run_number }}
VersionLabel: ${{ github.ref }}
defaults:
run:
shell: bash
jobs:
build:
runs-on: windows-latest
steps:
- name: 🤘 checkout
uses: actions/checkout@v2
with:
submodules: recursive
fetch-depth: 0
- name: ⚙ msbuild
uses: microsoft/[email protected]
- name: 🙏 build
shell: pwsh
working-directory: src/NuGetizer.Tests
run: |
dotnet restore Scenarios/given_a_packaging_project/a.nuproj
msbuild -r
- name: 📦 binlog
uses: actions/upload-artifact@v3
if: always()
with:
name: binlog-build-${{ github.run_number }}
path: src/NuGetizer.Tests/msbuild.binlog
- name: 🧪 test
uses: ./.github/workflows/test
- name: 📦 pack
run: dotnet pack -m:1
- name: 📦 binlog
uses: actions/upload-artifact@v3
if: always()
with:
name: binlog-pack-${{ github.run_number }}
path: msbuild.binlog
# Only push CI package to sleet feed if building on ubuntu (fastest)
- name: 🚀 sleet
env:
SLEET_CONNECTION: ${{ secrets.SLEET_CONNECTION }}
if: env.SLEET_CONNECTION != ''
run: |
dotnet tool install -g --version 4.0.18 sleet
sleet push bin --config none -f --verbose -p "SLEET_FEED_CONTAINER=nuget" -p "SLEET_FEED_CONNECTIONSTRING=${{ secrets.SLEET_CONNECTION }}" -p "SLEET_FEED_TYPE=azure" || echo "No packages found"
dotnet-format:
runs-on: ubuntu-latest
steps:
- name: 🤘 checkout
uses: actions/checkout@v2
with:
submodules: recursive
fetch-depth: 0
- name: ✓ ensure format
run: |
dotnet format whitespace --verify-no-changes -v:diag --exclude ~/.nuget
dotnet format style --verify-no-changes -v:diag --exclude ~/.nuget