40 lines
929 B
YAML
40 lines
929 B
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "**"
|
|
|
|
permissions:
|
|
contents: write
|
|
releases: write
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
name: Release
|
|
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
# Gitea's GITHUB_TOKEN is rejected by api.github.com. Pass a github.com PAT instead.
|
|
- name: Generate release notes
|
|
uses: orhun/git-cliff-action@v4
|
|
with:
|
|
config: cliff.toml
|
|
args: --latest --strip header
|
|
github_token: "$GITHUB_TOKEN"
|
|
env:
|
|
OUTPUT: release-notes.md
|
|
|
|
- name: Create release
|
|
uses: softprops/action-gh-release@v3
|
|
with:
|
|
prerelease: ${{ contains(github.ref, '-alpha') || contains(github.ref, '-beta') || contains(github.ref, '-rc') }}
|
|
body_path: release-notes.md |