2020-09-19 16:12:11 +08:00
|
|
|
on:
|
2022-08-15 15:30:24 +08:00
|
|
|
push:
|
|
|
|
tags:
|
|
|
|
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
|
2020-09-19 16:12:11 +08:00
|
|
|
|
2022-08-15 15:30:24 +08:00
|
|
|
name: Create Release
|
2020-09-19 16:12:11 +08:00
|
|
|
|
2022-08-15 15:30:24 +08:00
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: Create Release
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@master
|
|
|
|
- name: Get the release version from the tag
|
|
|
|
shell: bash
|
|
|
|
if: env.RELEASE_VERSION == ''
|
|
|
|
run: |
|
|
|
|
echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
|
|
|
|
- name: Generate Release Notes
|
|
|
|
run: |
|
|
|
|
./.github/workflows/release-notes.mjs ${{ env.RELEASE_VERSION }}
|
|
|
|
cat notes-${{ env.RELEASE_VERSION }}.md
|
|
|
|
- name: Create Release for Tag
|
|
|
|
id: release_tag
|
|
|
|
uses: softprops/action-gh-release@v1
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
|
|
|
|
with:
|
|
|
|
body_path: notes-${{ env.RELEASE_VERSION }}.md
|