Skip to content

Commit

Permalink
release test
Browse files Browse the repository at this point in the history
  • Loading branch information
k-wojcik committed Mar 20, 2024
1 parent 9588b7a commit 5c8867a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,24 @@ jobs:
run: dotnet restore
- name: build
run: dotnet build --no-restore
# release to NuGet if push of tag
release:
runs-on: ubuntu-latest
needs: build
if: startsWith(github.ref, 'refs/tags/')
#if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v3
- name: Set VERSION variable from tag
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
- name: Setup .NET 8 SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: pack
run: dotnet pack --configuration Release -o ./bin/nupkg
- name: push
run: dotnet nuget push ./bin/nupkg/*.nupkg -k ${{ secrets.NUGET_KEY }} -s https://api.nuget.org/v3/index.json
run: dotnet pack --configuration Release -o ./dist/nupkg -p:Version=${VERSION}
#- name: push
#run: dotnet nuget push ./dist/nupkg/*.nupkg -k ${{ secrets.NUGET_KEY }} -s https://api.nuget.org/v3/index.json
- name: Archive NuGet packages
uses: actions/upload-artifact@v4
with:
name: nuget-packages
path: ./dist/nupkg
6 changes: 3 additions & 3 deletions src/DocFxToTemplate.Tool/DocFxToTemplate.Tool.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Docfx.App" Version="2.75.3" />
<PackageReference Include="McMaster.Extensions.CommandLineUtils" Version="4.1.1" />
<PackageReference Include="Docfx.Dotnet" Version="2.75.3"/>
<PackageReference Include="McMaster.Extensions.CommandLineUtils" Version="4.1.1"/>
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.0"/>
<PackageReference Include="System.Text.Json" Version="8.0.3" />
<PackageReference Include="System.Text.Json" Version="8.0.3"/>
</ItemGroup>
</Project>

0 comments on commit 5c8867a

Please sign in to comment.