Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADD Auto changelog #435

Merged
merged 1 commit into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .auto-changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"package": true,
"unreleased": true,
"commitLimit": false,
"unreleasedOnly": true,
"replaceText": {
"#(\\d+)": "[`$1`](https://github.com/hugo-fixit/FixIt/issues/$1)",
"^Docs: ": ":memo: Docs: "
}
}
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ jobs:
hugo-version: latest
extended: true
- name: Build Hugo static files
run: hugo -v --source=docs --gc --minify
run: hugo -v --source=demo --gc --minify
43 changes: 43 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# This is a basic workflow to help you get started with Actions

name: Release for new tag

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
tags:
- 'v*.*.*'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18

- name: Install dependencies and generate release notes
run: |
npm install
npm run release

- name: GitHub Release
uses: softprops/action-gh-release@v2
with:
# Creates a draft release. Defaults to false
draft: true
body_path: CHANGELOG.md
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ $RECYCLE.BIN/
## Linux
.directory


CHANGELOG.md
42 changes: 42 additions & 0 deletions changelog-template.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Changelog

All notable changes to this project will be documented in this file.

{{#each releases}}
## [{{title}}]({{href}})

{{! List commits with `Breaking change: ` somewhere in the message }}
{{#commit-list commits heading='### :boom: Breaking Changes' message='(Breaking change: |BREAKING CHANGE: )'}}
- {{subject}} [`{{shorthash}}`]({{href}})
{{/commit-list}}

{{! List commits that add new features, but exclude those that have `:sparkles:` in the message}}
{{#commit-list commits heading='### :tada: New Features' message='(:tada: |Feat: |feat:)' exclude=':sparkles: '}}
- {{subject}} [`{{shorthash}}`]({{href}})
{{/commit-list}}

{{! List commits that enhance existing features, but exclude those that have `:tada:` in the message}}
{{#commit-list commits heading='### :sparkles: Enhancements' message='(:sparkles: |Feat: |feat: |Perf: |perf:
|Style: |style: )' exclude=':tada: '}}
- {{subject}} [`{{shorthash}}`]({{href}})
{{/commit-list}}

{{! List commits that bug fixes }}
{{#commit-list commits heading='### :bug: Bug Fixes' message='(Fix: |fix: |:bug: )'}}
- {{subject}} [`{{shorthash}}`]({{href}})
{{/commit-list}}

{{! List commits that improve the documentation }}
{{#commit-list commits heading='### :memo: Documentation' message='(Docs: |docs: )'}}
- {{subject}} [`{{shorthash}}`]({{href}})
{{/commit-list}}

{{! List other changes commits }}
{{#commit-list commits heading='### :wrench: Other Changes' message='(Refactor: |refactor: |Chore: |chore: |Build:
|build: Test: |test: )'}}
- {{subject}} [`{{shorthash}}`]({{href}})
{{/commit-list}}

- **Full Changelog**: {{href}}

{{/each}}
Loading