-
Notifications
You must be signed in to change notification settings - Fork 8
48 lines (35 loc) · 1.32 KB
/
ci.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
name: CI
on:
pull_request:
branches: [main]
workflow_dispatch:
permissions:
packages: write
jobs:
build:
runs-on: ubuntu-latest
env:
DOTNET_NOLOGO: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
MINVERBUILDMETADATA: build.$GITHUB_RUN_ATTEMPT
steps:
- name: ☁ Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: 👷 .NET SDK
uses: actions/setup-dotnet@v1
with:
dotnet-version: "6.0"
- name: ⬇ Install dependencies
run: dotnet restore
- name: 🔨 Build
run: dotnet build --configuration Release --no-restore /p:MinVerBuildMetadata=${{ github.run_number }}
# # - name: Test
# # run: dotnet test --no-restore --verbosity normal
- name: 📦 Pack
run: dotnet pack ./src/FluentEmail.Graph/FluentEmail.Graph.csproj -c Release -o ./artifacts --no-build
- name: 🔑 Add GitHub packages to nuget sources
run: dotnet nuget add source --username USERNAME --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/ESC-BV/index.json"
- name: 🚀 Publish to GitHub packages
run: dotnet nuget push "./artifacts/*.nupkg" --source "github" --api-key ${{ secrets.GITHUB_TOKEN }}