-
Notifications
You must be signed in to change notification settings - Fork 8
46 lines (34 loc) · 1.33 KB
/
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
name: Publish
on:
workflow_dispatch:
permissions:
packages: write
jobs:
build:
runs-on: ubuntu-latest
env:
DOTNET_NOLOGO: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
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
# # - 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: 🚀 Push package to Github and NuGet
run: |
dotnet nuget push "./artifacts/*.nupkg" --source "github" --api-key ${{ secrets.GITHUB_TOKEN }}
dotnet nuget push "./artifacts/*.nupkg" --source "https://api.nuget.org/v3/index.json" --api-key "${{secrets.NUGET_API_KEY}}"