Bump gittools/actions from 0.13.4 to 0.13.6 (#62) #76
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
name: Nightly MyGet Package Deploy | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
env: | |
DOTNET_CLI_TELEMETRY_OPTOUT: 'true' | |
steps: | |
- name: Setup .Net 8.0.x | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '8.0.x' | |
- uses: actions/checkout@v4 | |
- name: Fetch all history for all tags and branches | |
run: git fetch --prune --unshallow | |
- name: Install GitVersion | |
uses: gittools/actions/gitversion/setup@v0.13.6 | |
with: | |
versionSpec: '5.x' | |
- name: Use GitVersion | |
id: gitversion # step id used as reference for output values | |
uses: gittools/actions/gitversion/execute@v0.13.6 | |
- run: | | |
echo "MajorMinorPatch: ${{ steps.gitversion.outputs.MajorMinorPatch }}" | |
echo "NuGetVersionV2: ${{ steps.gitversion.outputs.nuGetVersionV2 }}" | |
echo "CommitsSinceVersionSourcePadded: ${{ steps.gitversion.outputs.CommitsSinceVersionSourcePadded }}" | |
- name: Restore with .Net | |
run: dotnet restore --nologo | |
- name: Build with .Net | |
run: dotnet build --configuration Release --no-restore --nologo "-p:Version=${{ steps.gitversion.outputs.NuGetVersionV2 }}" | |
- name: Pack with .Net | |
run: | | |
dotnet pack --nologo --no-build --configuration Release --output nuget-packages -p:PackageVersion=${{ steps.gitversion.outputs.NuGetVersionV2 }} src/GitReader.SourceGenerator/GitReader.SourceGenerator.csproj | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: Nuget-packages-${{ steps.gitversion.outputs.NuGetVersionV2 }} | |
path: nuget-packages | |
- name: Push package to Myget | |
if: ${{ vars.USE_MYGET == 'true' }} | |
run: dotnet nuget push 'nuget-packages/*.nupkg' --api-key ${{ secrets.MYGET_API_KEY }} --source https://www.myget.org/F/git-reader-source-generator/api/v3/index.json | |
- name: Push package to Feedz | |
if: ${{ vars.USE_FEEDZ == 'true' }} | |
run: dotnet nuget push 'nuget-packages/*.nupkg' --api-key ${{ secrets.FEEDZ_API_KEY }} --source https://f.feedz.io/aviationexam/git-reader-source-generator/nuget/index.json |