Skip to content

Commit

Permalink
Combine pack and push together
Browse files Browse the repository at this point in the history
  • Loading branch information
legigor authored and dependabot[bot] committed Jan 25, 2024
1 parent fb60461 commit b06d154
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,12 @@ jobs:
- name: Get tag name
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
id: vars
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/v}
- name: Pack
run: |
dotnet pack --no-restore --no-build --configuration Release --include-symbols --include-source -p:SymbolPackageFormat=snupkg -p:PackageVersion=${{ steps.vars.outputs.tag }} -o output/${{ steps.vars.outputs.tag }}
echo ::set-output name=tag::${GITHUB_REF#refs/*/v}
- name: Push the package
if: steps.vars.outputs.tag != null
run: |
dotnet pack --no-restore --no-build --configuration Release --include-symbols --include-source -p:SymbolPackageFormat=snupkg -p:PackageVersion=${{ steps.vars.outputs.tag }} -o output/${{ steps.vars.outputs.tag }}
dotnet nuget push output/${{ steps.vars.outputs.tag }}/*.nupkg --api-key ${{ secrets.NUGET_API_TOKEN }} --source https://api.nuget.org/v3/index.json
- name: Create release
if: steps.vars.outputs.tag != null
Expand Down

0 comments on commit b06d154

Please sign in to comment.