Skip to content

Pack and Publish NuGet #8

Pack and Publish NuGet

Pack and Publish NuGet #8

Workflow file for this run

# This is a basic workflow that is manually triggered
name: Pack and Publish NuGet
# Controls when the action will run. Workflow runs when manually triggered using the UI
# or API.
on:
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build-and-package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Fetch
run: git fetch --unshallow
- name: Setup .NET
uses: actions/setup-dotnet@v2.0.0
with:
dotnet-version: 7.0.203
- name: Add WASM workload
run: dotnet workload install wasm-tools
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build SqliteWasmHelper.sln --configuration Release --no-restore
- name: Test
run: dotnet test SqliteWasmHelper.sln --no-restore --verbosity normal
- name: Generate NuGet package
run: dotnet pack --no-build -c Release -o out
working-directory: ./SqliteWasmHelper
- name: Push generated package to GitHub registry
run: dotnet nuget push ./SqliteWasmHelper/out/*.nupkg --api-key ${{secrets.NUGET}} -s https://api.nuget.org/v3/index.json --skip-duplicate -n