Skip to content

Commit

Permalink
Merge pull request #8 from stscoundrel/feature/publish-workflow
Browse files Browse the repository at this point in the history
Feature/publish workflow
  • Loading branch information
stscoundrel authored Apr 24, 2022
2 parents 700afdc + c305535 commit 16d33c8
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
25 changes: 25 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Release package to NuGet

on:
release:
types: [created]

jobs:
deploy:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v3
- uses: actions/setup-dotnet@v2
with:
dotnet-version: '6.0.x'
source-url: https://nuget.pkg.github.com/stscoundrel/index.json
env:
NUGET_AUTH_TOKEN: ${{secrets.NUGET_TOKEN}}
- run: dotnet build --configuration Release src/OldNorwegianDictionary.csproj
- name: Create the package
run: dotnet pack --configuration Release src/OldNorwegianDictionary.csproj
- name: Publish the package to NuGet
run: dotnet nuget push src/OldNorwegianDictionary.csproj/bin/Release/*.nupkg
3 changes: 2 additions & 1 deletion src/OldNorwegianDictionary.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Authors>stscoundrel / Sampo Silvennoinen</Authors>
<PackageVersion>0.9.0</PackageVersion>
</PropertyGroup>

<ItemGroup>
<EmbeddedResource Include="resources/dictionary.json" />
</ItemGroup>
</ItemGroup>

</Project>

0 comments on commit 16d33c8

Please sign in to comment.