-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(cd): upload nuget to github packages
- Loading branch information
1 parent
43e1d52
commit b2eaff8
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,3 +23,32 @@ jobs: | |
run: dotnet build --configuration Release --no-restore Hamekoz.sln | ||
- name: Test | ||
run: dotnet test --no-restore --verbosity normal Hamekoz.sln | ||
|
||
- name: Install GitVersion | ||
uses: gittools/actions/gitversion/[email protected] | ||
with: | ||
versionSpec: '5.x' | ||
- name: Determine Version | ||
id: gitversion # step id used as reference for output values | ||
uses: gittools/actions/gitversion/[email protected] | ||
- name: Semantic Version | ||
run: | | ||
echo "SemVer: ${{ steps.gitversion.outputs.semVer }}" | ||
echo "FullSemVer: ${{ steps.gitversion.outputs.fullSemVer }}" | ||
echo "NuGetVersion: ${{ steps.gitversion.outputs.nuGetVersion }}" | ||
echo "MajorMinorPatch: ${{ steps.gitversion.outputs.majorMinorPatch }}" | ||
echo "Major: ${{ steps.gitversion.outputs.major }}" | ||
echo "Minor: ${{ steps.gitversion.outputs.minor }}" | ||
echo "Patch: ${{ steps.gitversion.outputs.patch }}" | ||
echo "PreReleaseTag: ${{ steps.gitversion.outputs.preReleaseTag }}" | ||
- name: Pack nuget | ||
run: dotnet pack --output ./artifacts --configuration Release -p:Version=${{ steps.gitversion.outputs.nuGetVersion }} | ||
- name: Upload artifact | ||
uses: actions/[email protected] | ||
with: | ||
name: artifacts | ||
path: ./artifacts | ||
- name: Delivery nuget to Github Packages | ||
if: ${{ github.actor != 'dependabot[bot]' }} | ||
run: dotnet nuget push ./artifacts/*.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source 'https://nuget.pkg.github.com/MakingSense/index.json' |