Skip to content

Commit

Permalink
Create nuget release pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
skalahonza committed Dec 26, 2023
1 parent 0a8d7bf commit cc5de40
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 2 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/nuget.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Publish to NuGet

on:
workflow_dispatch:
release:
types: [created]

jobs:
publish:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Extract version from release tag
#run: echo "VERSION=$(echo ${{ github.ref }} | sed 's/refs\/tags\///')" >> $GITHUB_ENV
run: echo "VERSION=0.11.2" >> $GITHUB_ENV

- name: Build and Pack
run: |
echo "VERSION=$VERSION"
cd InfHelper
dotnet pack -c Release -p:PackageVersion=$VERSION -o nupkg
- name: Publish to NuGet
run: dotnet nuget push InfHelper/nupkg/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
8 changes: 6 additions & 2 deletions InfHelper/InfHelper.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
This NuGet allows you to parse .inf files and browse them using object model wrappers (InfData). You can browse categories and ´their keys by handling them as collections or simply using [id] operators. The NuGet is not meant for installing, only for parsing and browsing the file. The feature for creating and INF file will be added in next versions.
</Description>
<Copyright>Copyright © Jan Skála 2023 - All Rights Reserved</Copyright>
<Version>0.10.1</Version>
<OutputPath>bin\$(Configuration)\</OutputPath>
<Authors>Jan Skála</Authors>
<PackageId>InfHelper</PackageId>
<PackageLicenseUrl>http://opensource.org/licenses/Apache-2.0</PackageLicenseUrl>
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/skalahonza/InfHelper</PackageProjectUrl>
<RepositoryUrl>https://github.com/skalahonza/InfHelper</RepositoryUrl>
<PackageReleaseNotes>
Expand Down Expand Up @@ -44,4 +44,8 @@
<ItemGroup>
<Compile Remove="src\InfUtility.cs" />
</ItemGroup>

<ItemGroup>
<None Include="..\README.md" Pack="true" PackagePath=""/>
</ItemGroup>
</Project>

0 comments on commit cc5de40

Please sign in to comment.