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