Skip to content

Commit

Permalink
Add secret env for NUGET
Browse files Browse the repository at this point in the history
  • Loading branch information
Saibamen committed May 13, 2022
1 parent 2148094 commit 6f28b05
Showing 1 changed file with 14 additions and 20 deletions.
34 changes: 14 additions & 20 deletions .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,32 +44,26 @@ jobs:
run: dotnet pack --configuration Release **/${{ env.PACKAGE_3 }}.csproj
- name: Create package ${{ env.PACKAGE_4 }}
run: dotnet pack --configuration Release **/${{ env.PACKAGE_4 }}.csproj
#- name: Create Release
#id: create_release
#uses: actions/create-release@v1
#env:
#GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
#with:
#tag_name: IDAS.Client.Libs-Release_${{ steps.set_release_name.outputs.release_name }}
#release_name: IDAS.Client.Libs-Release_${{ steps.set_release_name.outputs.release_name }}
#prerelease: true
- uses: rickstaa/action-create-tag@v1
- name: Push packages
run: dotnet nuget push "**/*.nupkg" -k ${NUGET_TOKEN}
env:
NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }}
- name: Create tag
uses: rickstaa/action-create-tag@v1
with:
tag: IDAS.Client.Libs-Release_${{ steps.set_release_name.outputs.release_name }}
- name: Build Changelog
- name: Create release with changelog
id: build_changelog
uses: fregante/release-with-changelog@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
title: IDAS.Client.Libs-Release_${{ steps.set_release_name.outputs.release_name }}
tag: IDAS.Client.Libs-Release_${{ steps.set_release_name.outputs.release_name }}
prerelease: true
- name: Upload Assets to Release with a wildcard
uses: csexton/release-asset-action@v2
with:
pattern: "**/*.nupkg"
github-token: ${{ secrets.GITHUB_TOKEN }}
release-url: ${{ steps.create_release.outputs.upload_url }}

- name: Push packages
run: dotnet nuget push "**/*.nupkg"
# Waiting for https://github.com/fregante/release-with-changelog/pull/58
#- name: Upload Assets to Release with a wildcard
#uses: csexton/release-asset-action@v2
#with:
#pattern: "**/*.nupkg"
#github-token: ${{ secrets.GITHUB_TOKEN }}
#release-url: ${{ steps.create_release.outputs.upload_url }}

0 comments on commit 6f28b05

Please sign in to comment.