-
Notifications
You must be signed in to change notification settings - Fork 8
54 lines (41 loc) · 1.46 KB
/
ci.yml
File metadata and controls
54 lines (41 loc) · 1.46 KB
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
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@v6
with:
fetch-depth: 0
- name: 👷 .NET SDK
uses: actions/setup-dotnet@v5
with:
dotnet-version: "10.x"
- 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 ${{ github.actor }} \
--password ${{ secrets.GITHUB_TOKEN }} \
--store-password-in-clear-text \
--name github \
"https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json"
- name: 🚀 Publish to GitHub packages
run: dotnet nuget push "./artifacts/*.nupkg" --source "github" --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate