Skip to content

Feature/update NuGet to 1.3.3v (#357) #71

Feature/update NuGet to 1.3.3v (#357)

Feature/update NuGet to 1.3.3v (#357) #71

Workflow file for this run

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