Skip to content

Merge branch 'development' into release #31

Merge branch 'development' into release

Merge branch 'development' into release #31

Workflow file for this run

name: Build and Publish NuGet
on:
push:
branches:
- release
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v2
with:
dotnet-version: '7.0'
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release
- name: Pack
run: dotnet pack --configuration Release
- name: Add private GitHub registry to NuGet
run: dotnet nuget add source -n "GPR" https://nuget.pkg.github.com/0xbadjuju/index.json -u 0xbadjuju -p ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text
- name: Push generated package to GitHub registry
run: dotnet nuget push ./bin/Release/*.nupkg --source "GPR" --api-key ${{ secrets.GITHUB_TOKEN }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish NuGet
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref_name }}
release_name: Release ${{ github.ref_name }}
files: ./bin/Release/*.nupkg
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}