Releasing 2.23.0 #48
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Post Release | |
on: | |
pull_request: | |
branches: [release/*] | |
types: [closed] | |
jobs: | |
PostMerge: | |
# this job will only run if the PR has been merged | |
if: github.event.pull_request.merged == true | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup Node | |
uses: actions/[email protected] | |
with: | |
node-version: '18.x' | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Extract branch name | |
id: extract_branch | |
run: echo "::set-output name=branch::${GITHUB_REF#refs/heads/}" | |
- name: Extract version | |
id: extract_version | |
run: | | |
version=$(echo ${{ steps.extract_branch.outputs.branch }} | cut --complement -d "/" -f 1) | |
echo "::set-output name=version::$version" | |
- name: Extract changelog for version | |
id: extract_changelog | |
run: | | |
changelog=$(node tools/cli/readChangelog.js ${{steps.extract_version.outputs.version}}) | |
changelog="${changelog//'%'/'%25'}" | |
changelog="${changelog//$'\n'/'%0A'}" | |
changelog="${changelog//$'\r'/'%0D'}" | |
echo -e "::set-output name=changelog::$changelog" | |
- name: Create Github Release | |
uses: ncipollo/release-action@v1 | |
with: | |
commit: '${{steps.extract_branch.outputs.branch}}' | |
tag: 'v${{steps.extract_version.outputs.version}}' | |
name: 'v${{steps.extract_version.outputs.version}}' | |
prerelease: false | |
body: '${{steps.extract_changelog.outputs.changelog}}' | |
- name: Notify TeamsFx Repo | |
uses: peter-evans/repository-dispatch@v2 | |
with: | |
token: ${{ secrets.TEAMSFX_REPO_ACCESS_TOKEN }} | |
repository: OfficeDev/TeamsFx | |
event-type: teamsjs-released | |
client-payload: '{"version": "${{ steps.extract_version.outputs.version }}"}' |