Skip to content

chore(release): v2.19.1 (#1125) #439

chore(release): v2.19.1 (#1125)

chore(release): v2.19.1 (#1125) #439

Workflow file for this run

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