chore(release): v2.19.4 (#1134) #448
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: Release | |
on: | |
push: | |
branches: [main] | |
permissions: | |
contents: write | |
jobs: | |
github-release: | |
runs-on: ubuntu-latest | |
if: "contains(github.event.head_commit.message, 'chore(release): v')" | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup Node.js LTS | |
uses: actions/setup-node@v2 | |
with: | |
node-version: lts/* | |
- name: Get Version Number | |
id: get-version-number | |
env: | |
COMMIT_MESSAGE: ${{github.event.head_commit.message}} | |
run: | | |
version_number=$(echo "$COMMIT_MESSAGE" | sed -n "s/.*\([0-9]\+\.[0-9]\+\.[0-9]\+\).*/\1/p") | |
echo "::set-output name=version_number::$version_number" | |
- name: Get Release Description | |
run: npx -y changelog-parser CHANGELOG.md | jq -r '.versions[0].body' > release_description.md | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: v${{steps.get-version-number.outputs.version_number}} | |
release_name: Release v${{steps.get-version-number.outputs.version_number}} | |
body_path: release_description.md | |
draft: false | |
prerelease: false |