-
-
Notifications
You must be signed in to change notification settings - Fork 4
58 lines (50 loc) · 1.63 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
name: build
on:
workflow_dispatch:
push:
branches: [ main ]
paths:
- 'samples/**'
- 'src/**'
pull_request:
types: [opened, synchronize, reopened]
env:
DOTNET_NOLOGO: true
VersionLabel: ${{ github.ref }}
Configuration: Release
defaults:
run:
shell: bash
jobs:
build:
runs-on: windows-latest
steps:
- name: 🤘 checkout
uses: actions/checkout@v2
- name: 🙏 build
run: |
dotnet build -m:1
dotnet pack src/Package
dotnet build ./samples/dotnet/
dotnet build src/App --output ./app
- name: 🧪 test
run: dotnet test --filter SponsorLink=true
- name: 🔓 login
if: github.ref == 'refs/heads/main'
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: 🚀 deploy
if: github.ref == 'refs/heads/main'
uses: Azure/functions-action@v1
with:
app-name: ${{ vars.AZURE_APPNAME }}
package: ./app
- 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"
sleet push ./samples/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"