2021-03-02 01:43:32 +00:00
|
|
|
name: Release
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- v*
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
changelog:
|
|
|
|
name: Update Changelog
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Get version from tag
|
|
|
|
env:
|
|
|
|
GITHUB_REF: ${{ github.ref }}
|
|
|
|
run: |
|
|
|
|
export CURRENT_VERSION=${GITHUB_TAG/refs\/tags\/v/}
|
2021-03-02 05:25:42 +00:00
|
|
|
echo "CURRENT_VERSION=$CURRENT_VERSION" >> $GITHUB_ENV
|
2021-03-02 01:43:32 +00:00
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
ref: core
|
|
|
|
- name: Update Changelog
|
|
|
|
uses: heinrichreimer/github-changelog-generator-action@v2.1.1
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
2021-03-24 04:59:01 +00:00
|
|
|
issues: false
|
|
|
|
issuesWoLabels: false
|
2021-03-02 01:43:32 +00:00
|
|
|
pullRequests: true
|
|
|
|
prWoLabels: true
|
|
|
|
addSections: '{"documentation":{"prefix":"**Documentation:**","labels":["documentation"]}}'
|
|
|
|
- uses: stefanzweifel/git-auto-commit-action@v4
|
|
|
|
with:
|
|
|
|
commit_message: Update Changelog for tag ${{ env.CURRENT_VERSION }}
|
|
|
|
file_pattern: CHANGELOG.md
|
|
|
|
|
|
|
|
release_notes:
|
|
|
|
name: Create Release Notes
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: changelog
|
|
|
|
steps:
|
|
|
|
- name: Get version from tag
|
|
|
|
env:
|
|
|
|
GITHUB_REF: ${{ github.ref }}
|
|
|
|
run: |
|
|
|
|
export CURRENT_VERSION=${GITHUB_TAG/refs\/tags\/v/}
|
2021-03-02 05:25:42 +00:00
|
|
|
echo "CURRENT_VERSION=$CURRENT_VERSION" >> $GITHUB_ENV
|
2021-03-02 01:43:32 +00:00
|
|
|
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
ref: core
|
|
|
|
|
|
|
|
- name: Get Changelog Entry
|
|
|
|
id: changelog_reader
|
|
|
|
uses: mindsers/changelog-reader-action@v1
|
|
|
|
with:
|
|
|
|
version: ${{ env.CURRENT_VERSION }}
|
|
|
|
path: ./CHANGELOG.md
|
|
|
|
|
|
|
|
- name: Create Release
|
|
|
|
id: create_release
|
|
|
|
uses: actions/create-release@v1
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
with:
|
|
|
|
tag_name: ${{ github.ref }}
|
|
|
|
release_name: Release ${{ github.ref }}
|
|
|
|
body: ${{ steps.changelog_reader.outputs.log_entry }}
|
|
|
|
draft: false
|
|
|
|
prerelease: false
|