From 258a007b9c41add3b6a2f10a55ad7f176a907b88 Mon Sep 17 00:00:00 2001 From: oliverbeumkes-nhs Date: Thu, 19 Mar 2026 12:14:35 +0000 Subject: [PATCH 1/2] [PRM-691] Removal of automated release tool --- .github/workflows/tool-create-release.yml | 72 ----------------------- 1 file changed, 72 deletions(-) delete mode 100644 .github/workflows/tool-create-release.yml diff --git a/.github/workflows/tool-create-release.yml b/.github/workflows/tool-create-release.yml deleted file mode 100644 index c1640d07..00000000 --- a/.github/workflows/tool-create-release.yml +++ /dev/null @@ -1,72 +0,0 @@ -name: "TOOL: Create Release" - -run-name: ${{ inputs.tag }} - -on: - workflow_dispatch: - inputs: - tag: - description: "Tag to release (e.g. 1.0.0)" - type: string - required: true - -permissions: {} -jobs: - create_release: - name: Create Release - runs-on: ubuntu-latest - environment: dev - permissions: - contents: write - id-token: write - env: - tag: ${{ inputs.tag }} - steps: - - name: Validate Tag Format - run: | - if [[ ! "$tag" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then - echo "Error: Tag must be in the format X.Y.Z (e.g. 1.0.0)" - exit 1 - fi - - - name: Checkout Repository - uses: actions/checkout@v6 - with: - fetch-depth: 0 - - - name: Check if tag already exists - id: check-tag - run: | - if git rev-parse "refs/tags/$tag" >/dev/null 2>&1; then - echo "Error: Tag $tag already exists." - exit 1 - fi - - - name: Create GitHub tag - run: | - git config --global user.name "github-actions" - git config --global user.email "github-actions@github.com" - git tag $tag - git push origin $tag - - - name: Create new floating tag (Major Version) - if: endsWith(env.tag, '.0.0') - run: | - git config user.name "github-actions" - git config user.email "github-actions@github.com" - floating_tag="v${tag%%.*}" - git tag $floating_tag - git push origin $floating_tag - - tag-application-repository: - needs: create_release - name: Tag orphaned-record-continuity tag - permissions: - contents: write - id-token: write - uses: NHSDigital/orphaned-record-continuity/.github/workflows/tool-create-release.yml@main - with: - environment: dev - tag: ${{ inputs.tag }} - secrets: - IAM_ROLE: ${{ secrets.IAM_ROLE }} From fb3cc705ca06c72c45d5094ea4fcb1a9f71acb53 Mon Sep 17 00:00:00 2001 From: oliverbeumkes-nhs Date: Thu, 19 Mar 2026 13:27:08 +0000 Subject: [PATCH 2/2] [PRM-691] Restoring of automated release tool without app tagging --- .github/workflows/tool-create-release.yml | 60 +++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 .github/workflows/tool-create-release.yml diff --git a/.github/workflows/tool-create-release.yml b/.github/workflows/tool-create-release.yml new file mode 100644 index 00000000..ab6724bc --- /dev/null +++ b/.github/workflows/tool-create-release.yml @@ -0,0 +1,60 @@ +name: "TOOL: Create Release" + +run-name: ${{ inputs.tag }} + +on: + workflow_dispatch: + inputs: + tag: + description: "Tag to release (e.g. 1.0.0)" + type: string + required: true + +permissions: {} + +jobs: + create_release: + name: Create Release + runs-on: ubuntu-latest + environment: dev + permissions: + contents: write + id-token: write + env: + tag: ${{ inputs.tag }} + steps: + - name: Validate Tag Format + run: | + if [[ ! "$tag" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + echo "Error: Tag must be in the format X.Y.Z (e.g. 1.0.0)" + exit 1 + fi + + - name: Checkout Repository + uses: actions/checkout@v6 + with: + fetch-depth: 0 + + - name: Check if tag already exists + id: check-tag + run: | + if git rev-parse "refs/tags/$tag" >/dev/null 2>&1; then + echo "Error: Tag $tag already exists." + exit 1 + fi + + - name: Create GitHub tag + run: | + git config --global user.name "github-actions" + git config --global user.email "github-actions@github.com" + git tag $tag + git push origin $tag + + - name: Create new floating tag (Major Version) + if: endsWith(env.tag, '.0.0') + run: | + git config user.name "github-actions" + git config user.email "github-actions@github.com" + floating_tag="v${tag%%.*}" + git tag $floating_tag + git push origin $floating_tag