diff --git a/.github/release-notes.yml b/.github/release-notes.yml index 8edbf0d1..3bae10e4 100644 --- a/.github/release-notes.yml +++ b/.github/release-notes.yml @@ -1,9 +1,26 @@ +# Copyright 2020-2023 Crown Copyright +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + releasenotes: sections: - title: "Headliners" emoji: ":star:" labels: [ "headliner" ] - title: "New Features" + emoji: ":gift:" + labels: [ "feature" ] + - title: "Enhancements" emoji: ":sparkles:" labels: [ "enhancement" ] - title: "Bugs Fixed" @@ -14,4 +31,4 @@ releasenotes: labels: "documentation" - title: "Automation" emoji: ":robot:" - labels: [ "automation" ] \ No newline at end of file + labels: [ "automation" ] diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index 2bd04488..d55dba4f 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -33,7 +33,7 @@ jobs: remove-android: 'true' overprovision-lvm: 'true' - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 diff --git a/.github/workflows/create-hotfix-branch.yaml b/.github/workflows/create-hotfix-branch.yaml index 6dff2e81..8a02ce65 100644 --- a/.github/workflows/create-hotfix-branch.yaml +++ b/.github/workflows/create-hotfix-branch.yaml @@ -27,7 +27,7 @@ jobs: steps: - name: Checkout master - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: master token: ${{ secrets.ADMIN_GITHUB_TOKEN }} @@ -46,29 +46,12 @@ jobs: if: ${{ !github.event.inputs.version }} run: echo "CURRENT_VERSION=$(echo ${{ steps.get-latest-tag.outputs.tag }} | sed 's/^v//')" >> $GITHUB_ENV - - name: Bump latest tag variable + - name: Bump latest tag variable version if: ${{ !github.event.inputs.version }} - uses: actions-ecosystem/action-bump-semver@v1 - id: bump-semver - with: - current_version: ${{ env.CURRENT_VERSION }} - level: patch - - - name: Set version automatically - if: ${{ !github.event.inputs.version }} - run: echo "RELEASE_VERSION=$(echo ${{ steps.bump-semver.outputs.new_version }} )" >> $GITHUB_ENV + run: echo "RELEASE_VERSION=$(echo ${{ env.CURRENT_VERSION }} | sed -r 's/([0-9]+)\.([0-9]+)\.([0-9]+)/echo \1.\2.$((\3+1))/' | sh)" >> $GITHUB_ENV - name: Verify version regex - uses: actions-ecosystem/action-regex-match@v2 - id: regex-match - with: - text: ${{ env.RELEASE_VERSION }} - # Ensure version doesn't end in .0 - regex: '^(0|[1-9]\d*)\.(0|[1-9]\d*)\.([1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$' - - - name: Fail if incorrect version - if: ${{ !steps.regex-match.outputs.match }} - run: exit 1 + run: echo ${{ env.RELEASE_VERSION }} | grep -E '^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$' - name: Set hotfix branch run: echo "BRANCH_NAME=$(echo hotfix/${{ env.RELEASE_VERSION }} )" >> $GITHUB_ENV diff --git a/.github/workflows/create-release-branch.yaml b/.github/workflows/create-release-branch.yaml index 63810e47..7782110b 100644 --- a/.github/workflows/create-release-branch.yaml +++ b/.github/workflows/create-release-branch.yaml @@ -27,7 +27,7 @@ jobs: steps: - name: Checkout develop - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: develop token: ${{ secrets.ADMIN_GITHUB_TOKEN }} @@ -46,29 +46,12 @@ jobs: if: ${{ !github.event.inputs.version }} run: echo "CURRENT_VERSION=$(echo ${{ steps.get-latest-tag.outputs.tag }} | sed 's/^v//')" >> $GITHUB_ENV - - name: Bump latest tag variable + - name: Bump latest tag variable version if: ${{ !github.event.inputs.version }} - uses: actions-ecosystem/action-bump-semver@v1 - id: bump-semver - with: - current_version: ${{ env.CURRENT_VERSION }} - level: minor - - - name: Set version automatically - if: ${{ !github.event.inputs.version }} - run: echo "RELEASE_VERSION=$(echo ${{ steps.bump-semver.outputs.new_version }} )" >> $GITHUB_ENV + run: echo "RELEASE_VERSION=$(echo ${{ env.CURRENT_VERSION }} | sed -r 's/([0-9]+)\.([0-9]+)\.([0-9]+)/echo \1.$((\2+1)).0/' | sh)" >> $GITHUB_ENV - name: Verify version regex - uses: actions-ecosystem/action-regex-match@v2 - id: regex-match - with: - text: ${{ env.RELEASE_VERSION }} - # Ensure valid semver version - regex: '^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$' - - - name: Fail if incorrect version - if: ${{ !steps.regex-match.outputs.match }} - run: exit 1 + run: echo ${{ env.RELEASE_VERSION }} | grep -E '^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$' - name: Set release branch run: echo "BRANCH_NAME=$(echo release/${{ env.RELEASE_VERSION }} )" >> $GITHUB_ENV diff --git a/.github/workflows/integration-test.yaml b/.github/workflows/integration-test.yaml index af6c07fc..439ed099 100644 --- a/.github/workflows/integration-test.yaml +++ b/.github/workflows/integration-test.yaml @@ -25,7 +25,7 @@ jobs: GAFFER_VERSION: develop GAFFER_TESTER_VERSION: develop steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Run Integration Tests run: | diff --git a/.github/workflows/link-issue.yaml b/.github/workflows/link-issue.yaml index a177ca96..e13ea9be 100644 --- a/.github/workflows/link-issue.yaml +++ b/.github/workflows/link-issue.yaml @@ -1,3 +1,17 @@ +# Copyright 2020-2023 Crown Copyright +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + name: 'Issue Links' on: pull_request: @@ -7,7 +21,7 @@ jobs: issue-links: runs-on: ubuntu-latest steps: - - uses: tkt-actions/add-issue-links@v1.6.0 + - uses: tkt-actions/add-issue-links@v1.8.2 with: repo-token: '${{ secrets.GITHUB_TOKEN }}' branch-prefix: 'gh-' diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index bce357cc..24584f3f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -28,7 +28,7 @@ jobs: steps: - name: Checkout master - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: master token: ${{ secrets.ADMIN_GITHUB_TOKEN }} @@ -47,7 +47,7 @@ jobs: - name: Output branch name id: branch - run: echo "::set-output name=branch_name::$BRANCH_NAME" + run: echo "branch_name=$BRANCH_NAME" >> $GITHUB_OUTPUT - name: Fail if no branch found if: ${{ !env.BRANCH_NAME }} @@ -76,7 +76,7 @@ jobs: - create-release-tag steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: ref: ${{ matrix.branch }} token: ${{ secrets.ADMIN_GITHUB_TOKEN }} @@ -101,7 +101,7 @@ jobs: - update-branches steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: ref: develop @@ -129,7 +129,7 @@ jobs: release_upload_url: ${{ steps.upload_notes.outputs.upload_url }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: ref: develop @@ -167,7 +167,7 @@ jobs: - gaffer-jhub steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: ref: develop @@ -206,7 +206,7 @@ jobs: steps: - name: Checkout gh-pages - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: gh-pages token: ${{ secrets.ADMIN_GITHUB_TOKEN }}