Update pipelines to include tags #3
Workflow file for this run
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| branches-ignore: | |
| - master | |
| pull_request: | |
| branches: | |
| - '**' | |
| jobs: | |
| build-test-pack: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| fetch-tags: true | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '10.0.x' | |
| - name: Install GitVersion | |
| uses: gittools/actions/gitversion/setup@v3.0.0 | |
| with: | |
| versionSpec: '6.0.0' | |
| - name: Determine Version | |
| id: gitversion | |
| shell: bash | |
| run: | | |
| VERSION=$(dotnet gitversion /output json /showvariable SemVer) | |
| echo "VERSION=$VERSION" >> $GITHUB_ENV | |
| - name: Restore dependencies | |
| run: dotnet restore --artifacts-path=/tmp/artifacts/blazor-hashrouting | |
| - name: Build | |
| run: dotnet build --configuration Release --no-restore --artifacts-path=/tmp/artifacts/blazor-hashrouting | |
| - name: Run tests | |
| run: dotnet test --configuration Release --no-build --artifacts-path=/tmp/artifacts/blazor-hashrouting | |
| - name: Pack | |
| run: dotnet pack src/Blazor.HashRouting/Blazor.HashRouting.csproj --configuration Release --no-build --artifacts-path=/tmp/artifacts/blazor-hashrouting | |
| - name: Upload package artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: blazor-hashrouting-${{ env.VERSION }} | |
| path: /tmp/artifacts/blazor-hashrouting/package/release/* |