-
Notifications
You must be signed in to change notification settings - Fork 14
38 lines (31 loc) · 1.3 KB
/
release.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
name: Deploy to NuGet
on:
push:
branches:
- master
jobs:
build-and-test:
name: Build & Test
uses: CropperBlazor/Cropper.Blazor/.github/workflows/build-test-template.yml@dev
secrets: inherit
with:
configuration: 'Release'
publish-coverage: true
deploy-to-nuget:
name: Deploy to NuGet
runs-on: ubuntu-latest
needs: build-and-test
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Pack package
run: dotnet pack -c Release
working-directory: src/Cropper.Blazor/Cropper.Blazor
- name: Push to NuGet Gallery
run: dotnet nuget push bin/Release/*.nupkg --source "https://api.nuget.org/v3/index.json" --api-key ${{secrets.NUGET_API_KEY}} --skip-duplicate
working-directory: src/Cropper.Blazor/Cropper.Blazor
- name: Add NuGet repository source
run: dotnet nuget add source --username CropperBlazor --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/CropperBlazor/index.json"
- name: Publish NuGet package to GitHub packages
run: dotnet nuget push bin/Release/*.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source "github" --skip-duplicate
working-directory: src/Cropper.Blazor/Cropper.Blazor