From 1233526575b31741f81f0e1cefe584b783ff1ab6 Mon Sep 17 00:00:00 2001 From: Miran Kurukulasuriya Date: Tue, 8 Aug 2023 06:48:08 +0530 Subject: [PATCH] Adjust details --- .github/workflows/publish-release.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 2e0431c85b..1fc6dbb6f6 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -125,13 +125,18 @@ jobs: GITHUB_TOKEN: ${{ secrets.BALLERINA_BOT_TOKEN }} run: | gh repo view ballerina-platform/ballerina-dev-website -b release-2201.7.0 --json url --jq '.clone_url' - gh api repos/ballerina-platform/ballerina-dev-website/contents/downloads/verify-ballerina-artifacts.md?ref=release-2201.7.0 -H 'Accept: application/vnd.github.v3.raw' > release_notes.md - - name: Update Markdown file + gh api repos/ballerina-platform/ballerina-dev-website/contents/downloads/verify-ballerina-artifacts.md -H 'Accept: application/vnd.github.v3.raw' > release_notes.md + sed -i '1,10d' release_notes.md + - name: Retrieve Branch + id: retrieve-branch run: | branchName=$(echo ${{ github.ref }} | cut -d'/' -f3) - if ${{ github.event.inputs.isPreRelease }} == 'true'; then - echo "" > release_notes.md; - else sed -i 's/{{ version }}/${{ steps.version-set.outputs.taggedVersion }}/g' release_notes.md; sed -i 's/{{ branch }}/$branchName/g' release_notes.md; fi + echo "::set-output name=branchName::$branchName" + - name: Update Markdown file + run: | + if ${{ github.event.inputs.isPreRelease }} == 'true'; then + echo "" > release_notes.md; + else sed -i 's/{{ version }}/${{ steps.version-set.outputs.taggedVersion }}/g' release_notes.md; sed -i 's/{{ branch }}/${{ steps.retrieve-branch.outputs.branchName }}/g' release_notes.md; fi - name: Read release notes from file id: release_notes uses: actions/github-script@v4