Skip to content

Commit

Permalink
Add nugget package publish
Browse files Browse the repository at this point in the history
  • Loading branch information
Apolixit committed Jul 30, 2023
1 parent 1f8b561 commit 149b850
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: publish

on:
push:
branches: [ master ]

jobs:
build:
name: Publish to NuGet
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

##
# Setup
# Setup multiple .NET versions so we can build against all referenced .NET versions.
##
- name: Setup .NET 6.0.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x

- name: Setup .NET 7.0.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x

##
# Publish
##
- name: Publish Substrate.NET.Metadata on version change
id: publish_nuget
uses: alirezanet/[email protected]
with:
# Filepath of the project to be packaged, relative to root of repository
PROJECT_FILE_PATH: Substrate.NET.Metadata/Substrate.NET.Metadata.csproj
# NuGet package id, used for version detection & defaults to project name
PACKAGE_NAME: Substrate.NET.Metadata
# API key to authenticate with NuGet server
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
1 change: 1 addition & 0 deletions Substrate.NET.Metadata/Substrate.NET.Metadata.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>0.1.0</Version>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit 149b850

Please sign in to comment.