Skip to content

Merge pull request #1 from dotnetKyle/dependabot/github_actions/dot-g… #13

Merge pull request #1 from dotnetKyle/dependabot/github_actions/dot-g…

Merge pull request #1 from dotnetKyle/dependabot/github_actions/dot-g… #13

Workflow file for this run

name: CD-Build
on:
push:
# Runs on all branches so they share a github.run_number increment
branches: [ stable ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore src/WASM.Console/WASM.Console.csproj
- name: Build WASM Console
run: >
dotnet build src/WASM.Console/WASM.Console.csproj
-c Release
--no-restore
-f net6.0
# packs all nuget packages at once
- name: Pack WASM Console Nuget
run: >
dotnet pack src/WASM.Console/WASM.Console.csproj
-c Release
--no-build
-p:PackageVersion=0.0.${{github.run_number}}
- name: Publish WASM Console Artifacts
uses: actions/upload-artifact@v2
with:
name: Nugets
path: src/**/bin/**/*.nupkg
production:
needs: build
name: Deploy Nuget packages to production
environment:
name: Production
runs-on: ubuntu-latest
steps:
- name: Download nugets
uses: actions/download-artifact@v4.1.7
with:
name: Nugets
- name: Push MinimalCommandLine Nuget
run: >
dotnet nuget push ./WASM.Console/bin/Release/WASM.Console.0.0.${{github.run_number}}.nupkg
--api-key ${{secrets.NUGETKEY}}
--source https://api.nuget.org/v3/index.json