diff --git a/.github/workflows/nuget.yml b/.github/workflows/nuget.yml new file mode 100644 index 0000000..1d68f8a --- /dev/null +++ b/.github/workflows/nuget.yml @@ -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 }} diff --git a/InfHelper/InfHelper.csproj b/InfHelper/InfHelper.csproj index 3bafcc5..2c6e17b 100644 --- a/InfHelper/InfHelper.csproj +++ b/InfHelper/InfHelper.csproj @@ -8,11 +8,10 @@ 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. Copyright © Jan Skála 2023 - All Rights Reserved - 0.10.1 bin\$(Configuration)\ Jan Skála InfHelper - http://opensource.org/licenses/Apache-2.0 + Apache-2.0 https://github.com/skalahonza/InfHelper https://github.com/skalahonza/InfHelper