Skip to content

Release/10.8.1

Release/10.8.1 #35

Workflow file for this run

name: Release
on:
pull_request:
branches: [ master ]
types: [ closed ]
jobs:
release:
if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup variables
id: setup
run: |
VERSION=$(echo ${{github.event.pull_request.head.ref}} | cut -d/ -f2)
CHANGELOG=$(sed '0,/^## /d;/^## /Q' CHANGELOG.md)
newline=$'\n'
CHANGELOG="## v${VERSION}${newline}${CHANGELOG}"
echo "::set-output name=version::$VERSION"
echo "CHANGELOG<<EOF" >> $GITHUB_ENV
echo "$CHANGELOG" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Github Tag & Release
uses: ncipollo/release-action@v1
with:
tag: "v${{ steps.setup.outputs.version }}"
commit: ${{ github.event.pull_request.merge_commit_sha }}
body: ${{ env.CHANGELOG }}
token: ${{ secrets.GITHUB_TOKEN }}