diff --git a/.github/actions/build-version/action.yml b/.github/actions/build-version/action.yml new file mode 100644 index 00000000..707dbc0e --- /dev/null +++ b/.github/actions/build-version/action.yml @@ -0,0 +1,37 @@ +--- # Define build version properites +name: 'Define Build Version' +description: 'Defines the build version properties' + +runs: + using: "composite" + steps: + - name: "Get Unique Build Number" + if: steps.build_tools.outputs.BUILD_ENV == 'true' + uses: onyxmueller/build-tag-number@v1.0.3 + id: build-number + with: + token: ${{inputs.GITHUB_TOKEN}} + prefix: github + + - if: steps.build_tools.outputs.BUILD_ENV == 'true' + name: "Set Define Build Version" + shell: bash + run: dotnet buildversion --BuildNumber "${{steps.build-number.outputs.build_number}}" + env: + DOTNET_ROOT: "${{github.workspace}}/.dotnet/${{github.sha}}-${{github.run_id}}-${{github.run_number}}-${{github.run_attempt}}" + DOTNET_INSTALL_DIR: "${{github.workspace}}/.dotnet/${{github.sha}}-${{github.run_id}}-${{github.run_number}}-${{github.run_attempt}}" + DOTNET_MULTILEVEL_LOOKUP: "false" + DOTNET_NOLOGO: "true" + DOTNET_PRINT_TELEMETRY_MESSAGE: "false" + DOTNET_ReadyToRun: "0" + DOTNET_TC_QuickJitForLoops: "1" + DOTNET_TieredPGO: "1" + MSBUILDTERMINALLOGGER: "auto" + + - if: steps.build_tools.outputs.BUILD_ENV == 'true' + name: "Log build version" + shell: bash + run: | + echo "****************************************************************" + echo "* Current Build: ${{env.BUILD_VERSION}}" + echo "****************************************************************" diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index d0416157..018bd892 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -123,14 +123,9 @@ runs: core.info('NUGET_ADDITIONAL_RESTORE_FEED_PRERELEASE: ${{inputs.NUGET_ADDITIONAL_RESTORE_FEED_PRERELEASE}}'); core.info('NUGET_PACK: ${{inputs.NUGET_PACK}}'); - - name: "Fetch tags and master" + - name: "Set branch" shell: bash - run: | - git fetch --tags - echo "REF: $GITHUB_REF" - echo "SHA: $GITHUB_SHA" - echo "GIT_BRANCH=$GITHUB_REF" >> "$GITHUB_ENV" - git branch --remote + run: echo "GIT_BRANCH=$GITHUB_REF" >> "$GITHUB_ENV" - name: "Check file existence" id: check_files @@ -185,27 +180,7 @@ runs: TOOL_VERSION: latest - name: "Get Unique Build Number" - if: steps.build_tools.outputs.BUILD_ENV == 'true' - uses: onyxmueller/build-tag-number@v1.0.3 - id: build-number - with: - token: ${{inputs.GITHUB_TOKEN}} - prefix: github - - - if: steps.build_tools.outputs.BUILD_ENV == 'true' - name: "Set Define Build Version" - shell: bash - run: dotnet buildversion --BuildNumber "${{steps.build-number.outputs.build_number}}" - env: - DOTNET_ROOT: "${{github.workspace}}/.dotnet/${{github.sha}}-${{github.run_id}}-${{github.run_number}}-${{github.run_attempt}}" - DOTNET_INSTALL_DIR: "${{github.workspace}}/.dotnet/${{github.sha}}-${{github.run_id}}-${{github.run_number}}-${{github.run_attempt}}" - DOTNET_MULTILEVEL_LOOKUP: "false" - DOTNET_NOLOGO: "true" - DOTNET_PRINT_TELEMETRY_MESSAGE: "false" - DOTNET_ReadyToRun: "0" - DOTNET_TC_QuickJitForLoops: "1" - DOTNET_TieredPGO: "1" - MSBUILDTERMINALLOGGER: "auto" + uses: ./.github/actions/build-version - name: "Deploy check - Default" shell: bash diff --git a/.github/workflows/build-and-publish-pre-release.yml b/.github/workflows/build-and-publish-pre-release.yml index cbb2bfe6..5e2f5d21 100644 --- a/.github/workflows/build-and-publish-pre-release.yml +++ b/.github/workflows/build-and-publish-pre-release.yml @@ -40,9 +40,10 @@ jobs: run: sudo chown -R "$USER:$USER" "$GITHUB_WORKSPACE" - name: "Checkout Source" - uses: actions/checkout@v4.1.2 + uses: actions/checkout@v4.1.1 with: fetch-depth: 0 + fetch-tags: true - name: "Check Repo Visibility" uses: credfeto/action-repo-visibility@v1.2.0 diff --git a/.github/workflows/build-and-publish-release.yml b/.github/workflows/build-and-publish-release.yml index e4b0a504..440302a3 100644 --- a/.github/workflows/build-and-publish-release.yml +++ b/.github/workflows/build-and-publish-release.yml @@ -26,9 +26,10 @@ jobs: run: sudo chown -R "$USER:$USER" "$GITHUB_WORKSPACE" - name: "Checkout Source" - uses: actions/checkout@v4.1.2 + uses: actions/checkout@v4.1.1 with: fetch-depth: 0 + fetch-tags: true - name: "Check Repo Visibility" uses: credfeto/action-repo-visibility@v1.2.0 diff --git a/.github/workflows/create-prs-for-stale-branches.yml b/.github/workflows/create-prs-for-stale-branches.yml index 85e15a82..12558c66 100644 --- a/.github/workflows/create-prs-for-stale-branches.yml +++ b/.github/workflows/create-prs-for-stale-branches.yml @@ -33,10 +33,12 @@ jobs: - name: "Ensure JQ is installed" shell: bash run: sudo apt install -y jq + - name: "Checkout Source" - uses: actions/checkout@v4.1.2 + uses: actions/checkout@v4.1.1 with: fetch-depth: 0 + fetch-tags: true ref: main repository: ${{github.repository}} @@ -67,10 +69,12 @@ jobs: - name: "Initialise Workspace" shell: bash run: sudo chown -R "$USER:$USER" "$GITHUB_WORKSPACE" + - name: "Checkout Source" - uses: actions/checkout@v4.1.2 + uses: actions/checkout@v4.1.1 with: fetch-depth: 0 + fetch-tags: true ref: main repository: ${{github.repository}} diff --git a/.github/workflows/pr-lint.yml b/.github/workflows/pr-lint.yml index 987f459b..0e7fc66f 100644 --- a/.github/workflows/pr-lint.yml +++ b/.github/workflows/pr-lint.yml @@ -41,9 +41,10 @@ jobs: # shell: bash # run: sudo chown -R "$USER:$USER" "$GITHUB_WORKSPACE" # - name: "Checkout Source" -# uses: actions/checkout@v4.1.2 +# uses: actions/checkout@v4.1.1 # with: # fetch-depth: 0 +# fetch-tags: true # - if: |- # !endsWith(github.repository, '-template') # && !startsWith(github.head_ref, 'release/') @@ -60,14 +61,21 @@ jobs: - name: "Initialise Workspace" shell: bash run: sudo chown -R "$USER:$USER" "$GITHUB_WORKSPACE" - - if: (github.actor != 'dependabot[bot]' && !endsWith(github.repository , '-template')) - uses: actions/checkout@v4.1.2 + + - name: "Checkout Source" + if: (github.actor != 'dependabot[bot]' && !endsWith(github.repository , '-template')) + uses: actions/checkout@v4.1.1 with: fetch-depth: 0 - - if: (github.actor != 'dependabot[bot]' && !endsWith(github.repository , '-template')) + fetch-tags: true + + - name: "Diff Changes" + if: (github.actor != 'dependabot[bot]' && !endsWith(github.repository , '-template')) shell: bash run: echo "CHANGES=$(git diff --exit-code --no-patch --merge-base origin/main CHANGELOG.md 2> /dev/null && echo 0 || echo $?)" >> "$GITHUB_ENV" - - if: (github.actor != 'dependabot[bot]' && !endsWith(github.repository , '-template')) && env.CHANGES == '0' + + - name: "Report unchanged" + if: (github.actor != 'dependabot[bot]' && !endsWith(github.repository , '-template')) && env.CHANGES == '0' uses: actions/github-script@v7.0.1 with: script: | @@ -81,16 +89,20 @@ jobs: - name: "Initialise Workspace" shell: bash run: sudo chown -R "$USER:$USER" "$GITHUB_WORKSPACE" + - name: "Checkout Source" - uses: actions/checkout@v4.1.2 + uses: actions/checkout@v4.1.1 with: fetch-depth: 0 + fetch-tags: true + - name: "Get version from global.json" if: (github.actor != 'dependabot[bot]' && !endsWith(github.repository , '-template')) uses: credfeto/action-dotnet-version-detect@v1.3.0 with: file: src/global.json fallback: 8.0.* + - name: "Install dotnet" if: (github.actor != 'dependabot[bot]' && !endsWith(github.repository , '-template')) uses: actions/setup-dotnet@v4.0.0 @@ -111,12 +123,14 @@ jobs: 7.0.* 8.0.* ${{env.DOTNET_VERSION}} + - name: "Check Runner details" uses: actions/github-script@v7.0.1 with: script: | core.info('Name: ${{runner.name}}'); core.info('OS: ${{runner.os}}'); + - name: "Enable Local nuget feeds if caching" if: startsWith(runner.name, 'buildagent-') id: nuget-local-cache @@ -127,6 +141,7 @@ jobs: echo "PRERELEASE_BAGET_CACHE=${{vars.PRERELEASE_BAGET_CACHE}}" echo "RELEASE_BAGET_CACHE=${{vars.RELEASE_BAGET_CACHE}}" }>> "$GITHUB_OUTPUT" + - name: "Configure nuget feeds" if: (github.actor != 'dependabot[bot]' && !endsWith(github.repository , '-template')) uses: ./.github/actions/nuget @@ -137,6 +152,7 @@ jobs: NUGET_ADDITIONAL_RESTORE_FEED_PRERELEASE_CACHE: "" NUGET_ADDITIONAL_RESTORE_FEED_RELEASE: ${{vars.NUGET_ADDITIONAL_RESTORE_FEED_RELEASE}} NUGET_ADDITIONAL_RESTORE_FEED_PRERELEASE: "" + - name: "Enable dotnet tools" if: (github.actor != 'dependabot[bot]' && !endsWith(github.repository , '-template')) shell: bash @@ -151,12 +167,14 @@ jobs: DOTNET_TC_QuickJitForLoops: "1" DOTNET_TieredPGO: "1" MSBUILDTERMINALLOGGER: "auto" + - name: "Install Changelog tool" if: (github.actor != 'dependabot[bot]' && !endsWith(github.repository , '-template')) uses: ./.github/actions/dotnet-tool with: TOOL_NAME: Credfeto.ChangeLog.Cmd TOOL_VERSION: latest + - name: "Check Changelog" if: (github.actor != 'dependabot[bot]' && !endsWith(github.repository , '-template')) shell: bash @@ -179,10 +197,13 @@ jobs: - name: "Initialise Workspace" shell: bash run: sudo chown -R "$USER:$USER" "$GITHUB_WORKSPACE" + - name: "Checkout Source" - uses: actions/checkout@v4.1.2 + uses: actions/checkout@v4.1.1 with: fetch-depth: 0 + fetch-tags: true + - name: "Check for leaks" uses: DariuszPorowski/github-action-gitleaks@v2.0.9 id: gitleaks @@ -201,10 +222,13 @@ jobs: - name: "Initialise Workspace" shell: bash run: sudo chown -R "$USER:$USER" "$GITHUB_WORKSPACE" + - name: "Checkout Source" - uses: actions/checkout@v4.1.2 + uses: actions/checkout@v4.1.1 with: fetch-depth: 0 + fetch-tags: true + - name: "Check for merge conflicts" uses: olivernybroe/action-conflict-finder@v4.0 @@ -215,10 +239,13 @@ jobs: - name: "Initialise Workspace" shell: bash run: sudo chown -R "$USER:$USER" "$GITHUB_WORKSPACE" + - name: "Checkout Source" - uses: actions/checkout@v4.1.2 + uses: actions/checkout@v4.1.1 with: fetch-depth: 0 + fetch-tags: true + - name: "Check for case conflicts" uses: credfeto/action-case-checker@v1.3.0 @@ -229,10 +256,13 @@ jobs: - name: "Initialise Workspace" shell: bash run: sudo chown -R "$USER:$USER" "$GITHUB_WORKSPACE" + - name: "Checkout Source" - uses: actions/checkout@v4.1.2 + uses: actions/checkout@v4.1.1 with: fetch-depth: 0 + fetch-tags: true + - name: "Check for ignored files" uses: credfeto/action-no-ignored-files@v1.2.0 @@ -244,6 +274,7 @@ jobs: - name: "Initialise Workspace" shell: bash run: sudo chown -R "$USER:$USER" "$GITHUB_WORKSPACE" + - uses: credfeto/action-repo-visibility@v1.2.0 id: visibility with: @@ -251,11 +282,14 @@ jobs: repository: ${{github.repository}} # optional parameter defaults to the current user token: ${{github.token}} + - name: "Checkout Source" if: steps.visibility.outputs.is_public == 'true' - uses: actions/checkout@v4.1.2 + uses: actions/checkout@v4.1.1 with: fetch-depth: 0 + fetch-tags: true + - name: 'Dependency Review' if: steps.visibility.outputs.is_public == 'true' uses: actions/dependency-review-action@v4.1.3 @@ -268,10 +302,13 @@ jobs: - name: "Initialise Workspace" shell: bash run: sudo chown -R "$USER:$USER" "$GITHUB_WORKSPACE" + - name: "Checkout Source" - uses: actions/checkout@v4.1.2 + uses: actions/checkout@v4.1.1 with: fetch-depth: 0 + fetch-tags: true + - name: "Check for merge commits" uses: greenled/no-merge-commits-check@v1.0.1 @@ -284,10 +321,13 @@ jobs: - name: "Initialise Workspace" shell: bash run: sudo chown -R "$USER:$USER" "$GITHUB_WORKSPACE" + - name: "Checkout Source" - uses: actions/checkout@v4.1.2 + uses: actions/checkout@v4.1.1 with: fetch-depth: 0 + fetch-tags: true + - name: "Run Linter" uses: github/super-linter@v5.0.0 env: diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 4dcfc2c2..50d16960 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -51,9 +51,10 @@ jobs: run: sudo chown -R "$USER:$USER" "$GITHUB_WORKSPACE" - name: "Checkout source" - uses: actions/checkout@v4.1.2 + uses: actions/checkout@v4.1.1 with: fetch-depth: 1 + fetch-tags: true - name: "Find PR For branch" uses: juliangruber/find-pull-request-action@v1.8.1 diff --git a/.github/workflows/reformat-sql.yml b/.github/workflows/reformat-sql.yml index 71fa3ba9..fc9a1ad7 100644 --- a/.github/workflows/reformat-sql.yml +++ b/.github/workflows/reformat-sql.yml @@ -33,9 +33,10 @@ jobs: run: sudo chown -R "$USER:$USER" "$GITHUB_WORKSPACE" - name: "Checkout Source" - uses: actions/checkout@v4.1.2 + uses: actions/checkout@v4.1.1 with: fetch-depth: 0 + fetch-tags: true token: ${{secrets.SOURCE_PUSH_TOKEN}} - name: "Reformat" diff --git a/.github/workflows/reformat-yaml.yml b/.github/workflows/reformat-yaml.yml index 4e6abd7e..125f616e 100644 --- a/.github/workflows/reformat-yaml.yml +++ b/.github/workflows/reformat-yaml.yml @@ -34,9 +34,10 @@ jobs: run: sudo chown -R "$USER:$USER" "$GITHUB_WORKSPACE" - name: "Checkout Source" - uses: actions/checkout@v4.1.2 + uses: actions/checkout@v4.1.1 with: fetch-depth: 0 + fetch-tags: true token: ${{secrets.SOURCE_PUSH_TOKEN}} - name: "Reformat" diff --git a/.github/workflows/update-labels.yml b/.github/workflows/update-labels.yml index 280f3d24..f5e180f7 100644 --- a/.github/workflows/update-labels.yml +++ b/.github/workflows/update-labels.yml @@ -22,9 +22,10 @@ jobs: shell: bash run: sudo chown -R "$USER:$USER" "$GITHUB_WORKSPACE" - name: "Checkout Source" - uses: actions/checkout@v4.1.2 + uses: actions/checkout@v4.1.1 with: fetch-depth: 0 + fetch-tags: true token: ${{secrets.SOURCE_PUSH_TOKEN}} - name: "Update Github label config" if: success() diff --git a/src/global.json b/src/global.json index 66506aea..d4d56867 100644 --- a/src/global.json +++ b/src/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "8.0.201", + "version": "8.0.202", "allowPrerelease": false, "rollForward": "latestPatch" }