From 5e9b02ca1bb5f4521d04c7cab9d9d7c27b56a877 Mon Sep 17 00:00:00 2001 From: jamesthompson26-nhs Date: Mon, 3 Aug 2026 12:43:16 +0100 Subject: [PATCH 1/4] Release deprecated create-release action --- .github/workflows/stage-5-publish.yaml | 110 +++++-------------------- 1 file changed, 22 insertions(+), 88 deletions(-) diff --git a/.github/workflows/stage-5-publish.yaml b/.github/workflows/stage-5-publish.yaml index df5192a8f..30d63155a 100644 --- a/.github/workflows/stage-5-publish.yaml +++ b/.github/workflows/stage-5-publish.yaml @@ -40,6 +40,8 @@ jobs: name: "Publish packages" runs-on: ubuntu-latest timeout-minutes: 10 + permissions: + contents: write outputs: release_id: ${{ steps.create_release.outputs.id }} upload_url: ${{ steps.create_release.outputs.upload_url }} @@ -96,112 +98,48 @@ jobs: # path: ./artifacts/server-csharp-${{ inputs.version }} # name: server-csharp-${{ inputs.version }} - - name: "Create release" - id: create_release - uses: actions/create-release@0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e # v1.1.4 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ inputs.version }} - release_name: ${{ inputs.version }} - body: | - Release of ${{ inputs.version }} - draft: false - prerelease: ${{ inputs.is_version_prerelease == 'true'}} - - - name: "Upload jekyll docs release asset" - uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: "${{ steps.create_release.outputs.upload_url }}" - asset_path: ./artifacts/jekyll-docs-${{ inputs.version }}/artifact.tar - asset_name: jekyll-docs-${{ inputs.version }}.tar - asset_content_type: "application/gzip" - - - name: "Upload sdk html docs release asset" - uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: "${{ steps.create_release.outputs.upload_url }}" - asset_path: ./artifacts/sdk-html-docs-${{ inputs.version }}/artifact.tar - asset_name: sdk-html-docs-${{ inputs.version }}.tar - asset_content_type: "application/gzip" - - - name: "Upload sdk swagger docs release asset" - uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: "${{ steps.create_release.outputs.upload_url }}" - asset_path: ./artifacts/sdk-swagger-docs-${{ inputs.version }}/artifact.tar - asset_name: sdk-swagger-docs-${{ inputs.version }}.tar - asset_content_type: "application/gzip" - - name: "zip html release asset" # GitHub pages needs a single tar called artifact inside the zip. working-directory: ./artifacts/sdk-html-${{ inputs.version }} run: zip -r ../sdk-html-${{ inputs.version }}.zip . shell: bash - - name: "Upload sdk html release asset" - uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: "${{ steps.create_release.outputs.upload_url }}" - asset_path: ./artifacts/sdk-html-${{ inputs.version }}.zip - asset_name: sdk-html-${{ inputs.version }}.zip - asset_content_type: "application/gzip" - - name: "zip sdk ts release asset" # GitHub pages needs a single tar called artifact inside the zip. working-directory: ./artifacts/sdk-ts-${{ inputs.version }} run: zip -r ../sdk-ts-${{ inputs.version }}.zip . shell: bash - - name: "Upload sdk ts release asset" - uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: "${{ steps.create_release.outputs.upload_url }}" - asset_path: ./artifacts/sdk-ts-${{ inputs.version }}.zip - asset_name: sdk-ts-${{ inputs.version }}.zip - asset_content_type: "application/gzip" - - name: "zip sdk python release asset" # GitHub pages needs a single tar called artifact inside the zip. working-directory: ./artifacts/sdk-python-${{ inputs.version }} run: zip -r ../sdk-python-${{ inputs.version }}.zip . shell: bash - - name: "Upload sdk python release asset" - uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: "${{ steps.create_release.outputs.upload_url }}" - asset_path: ./artifacts/sdk-python-${{ inputs.version }}.zip - asset_name: sdk-python-${{ inputs.version }}.zip - asset_content_type: "application/gzip" - - name: "zip sdk csharp release asset" # GitHub pages needs a single tar called artifact inside the zip. working-directory: ./artifacts/sdk-csharp-${{ inputs.version }} run: zip -r ../sdk-csharp-${{ inputs.version }}.zip . shell: bash - - name: "Upload sdk csharp release asset" - uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: "Create release and upload assets" + id: create_release + uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65 # v2 with: - upload_url: "${{ steps.create_release.outputs.upload_url }}" - asset_path: ./artifacts/sdk-csharp-${{ inputs.version }}.zip - asset_name: sdk-csharp-${{ inputs.version }}.zip - asset_content_type: "application/gzip" + tag_name: ${{ inputs.version }} + name: ${{ inputs.version }} + body: | + Release of ${{ inputs.version }} + draft: false + prerelease: ${{ inputs.is_version_prerelease == 'true' }} + files: | + ./artifacts/jekyll-docs-${{ inputs.version }}/artifact.tar + ./artifacts/sdk-html-docs-${{ inputs.version }}/artifact.tar + ./artifacts/sdk-swagger-docs-${{ inputs.version }}/artifact.tar + ./artifacts/sdk-html-${{ inputs.version }}.zip + ./artifacts/sdk-ts-${{ inputs.version }}.zip + ./artifacts/sdk-python-${{ inputs.version }}.zip + ./artifacts/sdk-csharp-${{ inputs.version }}.zip # Take out for now - might add again in the future # - name: "zip csharp server release asset" @@ -245,14 +183,10 @@ jobs: shell: bash - name: "Upload OAS specification release asset" - uses: actions/upload-release-asset@e8f9f06c4b078e705bd2ea027f0926603fc9b4d5 # v1.0.2 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65 # v2 with: - upload_url: ${{ needs.publish.outputs.upload_url }} - asset_path: ./artifacts/api-oas-specification-${{ matrix.apimEnv }}-${{ inputs.version }}.zip - asset_name: api-oas-specification-${{ matrix.apimEnv }}-${{ inputs.version }}.zip - asset_content_type: "application/zip" + tag_name: ${{ inputs.version }} + files: ./artifacts/api-oas-specification-${{ matrix.apimEnv }}-${{ inputs.version }}.zip # Take out for now - might add again in the future # ### PUBLISH DOCKER - THIS NEEDS CHANGING TO DO THE DOCKER BUILD IN THE BUILD STAGE AND ARTIFACT IT. SEE publishlibhostdocker below how how and the buildlibs action. From 89a869e3d7b8aded5fce3a46579dfcadbb4b1f56 Mon Sep 17 00:00:00 2001 From: jamesthompson26-nhs Date: Mon, 3 Aug 2026 12:52:47 +0100 Subject: [PATCH 2/4] CCM-18981: Remove deprecated create-release action --- .github/workflows/stage-5-publish.yaml | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/.github/workflows/stage-5-publish.yaml b/.github/workflows/stage-5-publish.yaml index 30d63155a..6fe9396e0 100644 --- a/.github/workflows/stage-5-publish.yaml +++ b/.github/workflows/stage-5-publish.yaml @@ -301,24 +301,6 @@ jobs: env: NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - success: - name: "Success notification" - runs-on: ubuntu-latest - needs: [publish, publishnpm] - steps: - - name: "Check prerequisites for notification" - id: check - run: echo "secret_exist=${{ secrets.TEAMS_NOTIFICATION_WEBHOOK_URL != '' }}" >> $GITHUB_OUTPUT - - name: "Notify on publishing packages" - if: steps.check.outputs.secret_exist == 'true' - uses: nhs-england-tools/notify-msteams-action@a9fbb9bb41ef7db9c74d4fdc893f12812094fecf # v1.0.5 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - teams-webhook-url: ${{ secrets.TEAMS_NOTIFICATION_WEBHOOK_URL }} - message-title: "Notification title" - message-text: "This is a notification body" - link: ${{ github.event.pull_request.html_url }} - # Take out for now - might add again in the future # ### PUBLISH LIBS ABSTRACTION NUGET # publishlibsabstractionsnuget: From afe92d2fd676caf7450573b1c95cc59b6999843c Mon Sep 17 00:00:00 2001 From: jamesthompson26-nhs Date: Mon, 3 Aug 2026 12:56:49 +0100 Subject: [PATCH 3/4] CCM-18981: Update softprops/action-gh-release to v3.0.2 --- .github/workflows/stage-5-publish.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/stage-5-publish.yaml b/.github/workflows/stage-5-publish.yaml index 6fe9396e0..15d0d2256 100644 --- a/.github/workflows/stage-5-publish.yaml +++ b/.github/workflows/stage-5-publish.yaml @@ -124,7 +124,7 @@ jobs: - name: "Create release and upload assets" id: create_release - uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65 # v2 + uses: softprops/action-gh-release@fe965f7af51af5f2602596916f38a38df2e33de0 # v3.0.2 with: tag_name: ${{ inputs.version }} name: ${{ inputs.version }} @@ -183,7 +183,7 @@ jobs: shell: bash - name: "Upload OAS specification release asset" - uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65 # v2 + uses: softprops/action-gh-release@fe965f7af51af5f2602596916f38a38df2e33de0 # v3.0.2 with: tag_name: ${{ inputs.version }} files: ./artifacts/api-oas-specification-${{ matrix.apimEnv }}-${{ inputs.version }}.zip From ee9ec1f55f9e32b88412f496deecba023f6ff3ce Mon Sep 17 00:00:00 2001 From: jamesthompson26-nhs Date: Mon, 3 Aug 2026 12:59:53 +0100 Subject: [PATCH 4/4] CCM-18981: Fix softprops/action-gh-release SHA to commit hash --- .github/workflows/stage-5-publish.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/stage-5-publish.yaml b/.github/workflows/stage-5-publish.yaml index 15d0d2256..b9cb97206 100644 --- a/.github/workflows/stage-5-publish.yaml +++ b/.github/workflows/stage-5-publish.yaml @@ -124,7 +124,7 @@ jobs: - name: "Create release and upload assets" id: create_release - uses: softprops/action-gh-release@fe965f7af51af5f2602596916f38a38df2e33de0 # v3.0.2 + uses: softprops/action-gh-release@3d0d9888cb7fd7b750713d6e236d1fcb99157228 # v3.0.2 with: tag_name: ${{ inputs.version }} name: ${{ inputs.version }} @@ -183,7 +183,7 @@ jobs: shell: bash - name: "Upload OAS specification release asset" - uses: softprops/action-gh-release@fe965f7af51af5f2602596916f38a38df2e33de0 # v3.0.2 + uses: softprops/action-gh-release@3d0d9888cb7fd7b750713d6e236d1fcb99157228 # v3.0.2 with: tag_name: ${{ inputs.version }} files: ./artifacts/api-oas-specification-${{ matrix.apimEnv }}-${{ inputs.version }}.zip