Skip to content

Bump Nuke.Common from 8.1.1 to 8.1.2 #401

Bump Nuke.Common from 8.1.1 to 8.1.2

Bump Nuke.Common from 8.1.1 to 8.1.2 #401

Workflow file for this run

name: Build
on:
push:
branches:
- main
paths-ignore:
- .github/workflows/security-scanning-csharp.yml
- .github/workflows/skipped-build.yml
- .github/dependabot.yml
- '.vscode/**'
- 'docs/**'
- .editorconfig
- LICENSE
- README.md
pull_request:
branches:
- main
paths-ignore:
- .github/workflows/security-scanning-csharp.yml
- .github/workflows/skipped-build.yml
- .github/dependabot.yml
- '.vscode/**'
- 'docs/**'
- .editorconfig
- LICENSE
- README.md
jobs:
build:
name: Build
runs-on: ubuntu-latest
env:
CREATE_RELEASE: ${{ github.ref_name == 'main' && !contains(github.event.head_commit.message, '[skip-release]') && !contains(github.event.head_commit.message, 'dependabot[bot]') }}
IS_FEATURE_PULL_REQUEST: ${{ github.event_name == 'pull_request' && startsWith(github.head_ref, 'features/') }}
CREATE_PRERELEASE: 'false'
PACKAGE_VERSION:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-dotnet@v4
name: Install .NET 8
with:
dotnet-version: '8.0.x'
dotnet-quality: 'ga'
- name: Build
run: ./build.sh --package
- name: Upload NuGet packages
uses: actions/upload-artifact@v4
with:
name: packages
path: ./artifacts/packages
if-no-files-found: error
- name: Upload dotnet test results
uses: actions/upload-artifact@v4
with:
name: tests-results
path: ./artifacts/test-results/**/*.html
if-no-files-found: error
if: ${{ always() }}
- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: coverage
path: ./artifacts/coverage-report
- name: Determine if we're skipping release on feature Pull Request
if: ${{ env.IS_FEATURE_PULL_REQUEST == 'true' }}
run: |
headCommitMessage=$(git log ${{ github.event.pull_request.head.sha }} -n 1 --format=%B)
echo "HEAD commit message is: $headCommitMessage"
if [[ $headCommitMessage != *"[skip-release]"* ]]; then
echo "CREATE_PRERELEASE=true" >> $GITHUB_ENV
fi
- name: Create GitHub release on main branch
if: ${{ env.CREATE_RELEASE == 'true' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
touch empty-release-notes.txt
gh release create v${{ env.PACKAGE_VERSION }} --title v${{ env.PACKAGE_VERSION }} ./artifacts/packages/* --target ${{ github.sha }} --repo ${{ github.repository }} --notes-file empty-release-notes.txt
- name: Create GitHub prerelease on feature Pull Request
if: ${{ env.CREATE_PRERELEASE == 'true' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
touch empty-release-notes.txt
gh release create v${{ env.PACKAGE_VERSION }} --title v${{ env.PACKAGE_VERSION }} ./artifacts/packages/* --target ${{ github.sha }} --repo ${{ github.repository }} --notes-file empty-release-notes.txt --prerelease
- name: Push NuGet package on main branch
if: ${{ env.CREATE_RELEASE == 'true' }}
run: dotnet nuget push ./artifacts/packages/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }}