Skip to content

Create Release

Create Release #5

name: Create Release
on:
workflow_dispatch:
jobs:
create-github-release:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Initialize mandatory git config
run: |
git config user.name "GitHub Actions"
git config user.email noreply@github.com
- name: Setup release information
run: |
echo "PACKAGE_VERSION=$(cat package.json | grep version | head -1 | awk -F: '{ print $2 }' | sed 's/[",]//g')" >> $GITHUB_ENV
- name: Extract release notes
id: extract_release_notes
uses: ffurrer2/extract-release-notes@v1
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.PACKAGE_VERSION }}
release_name: v${{ env.PACKAGE_VERSION }}
body: ${{ steps.extract_release_notes.outputs.release_notes }}
draft: false
prerelease: false