add a github release action workflow

This commit is contained in:
ripytide 2023-12-28 14:07:18 +00:00
parent 6480e226a8
commit 0ac7a93ef3
No known key found for this signature in database
GPG Key ID: B2629F9EC7C2FE8C
3 changed files with 32 additions and 1 deletions

24
.github/workflows/gh-release.yaml vendored Normal file
View File

@ -0,0 +1,24 @@
name: Release
permissions:
contents: write
on:
push:
tags:
- v[0-9]+.*
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: taiki-e/create-gh-release-action@v1
with:
# (Optional) Path to changelog.
changelog: CHANGELOG.md
# (Optional) Reject releases from commits not contained in branches
# that match the specified pattern (regular expression)
branch: main
# (Required) GitHub token for creating GitHub Releases.
token: ${{ secrets.GITHUB_TOKEN }}

View File

@ -5,7 +5,9 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## Unreleased
<!-- next-header -->
## Unreleased - ReleaseDate
### Added

5
release.toml Normal file
View File

@ -0,0 +1,5 @@
pre-release-replacements = [
{file="CHANGELOG.md", search="Unreleased", replace="{{version}}"},
{file="CHANGELOG.md", search="ReleaseDate", replace="{{date}}"},
{file="CHANGELOG.md", search="<!-- next-header -->", replace="<!-- next-header -->\n\n## Unreleased - ReleaseDate", exactly=1},
]