26 lines
684 B
YAML
26 lines
684 B
YAML
name: Create Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*-custom"
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Create GitHub release with changelog
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
run: |
|
|
TITLE="${GITHUB_REF_NAME}"
|
|
if gh release view "$TITLE" --repo "$GITHUB_REPOSITORY" >/dev/null 2>&1; then
|
|
gh release edit "$TITLE" --repo "$GITHUB_REPOSITORY" --notes-file RELEASE_NOTES.md --title "$TITLE"
|
|
else
|
|
gh release create "$TITLE" --repo "$GITHUB_REPOSITORY" --title "$TITLE" --notes-file RELEASE_NOTES.md
|
|
fi
|