Skip to content

Commit

Permalink
chore(cd): upload nuget to github packages
Browse files Browse the repository at this point in the history
  • Loading branch information
RodrigoPereyraDiaz authored Feb 24, 2023
1 parent 43e1d52 commit b2eaff8
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'

0 comments on commit b2eaff8

Please sign in to comment.