-
Notifications
You must be signed in to change notification settings - Fork 594
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
21e17b4
commit ac96a86
Showing
5 changed files
with
64 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
"use strict"; | ||
const config = require("conventional-changelog-conventionalcommits"); | ||
|
||
module.exports = config({ | ||
types: [ | ||
{ | ||
type: "feat", | ||
section: "✨ Features", | ||
}, | ||
{ | ||
type: "fix", | ||
section: "🐛 Bug Fixes", | ||
}, | ||
{ | ||
type: "chore", | ||
section: "🧹 Maintenance", | ||
}, | ||
{ | ||
type: "docs", | ||
section: "📚 Documentation", | ||
}, | ||
{ | ||
type: "style", | ||
section: "💅 Styles", | ||
}, | ||
{ | ||
type: "refactor", | ||
section: "🔨 Refactoring", | ||
}, | ||
{ | ||
type: "perf", | ||
section: "⚡ Performance Improvements", | ||
}, | ||
{ | ||
type: "test", | ||
section: "✅ Tests", | ||
}, | ||
], | ||
}); |
10 changes: 10 additions & 0 deletions
10
.github/conventional-changelog/pre-changelog-generation.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Next version e.g. 1.12.3 | ||
module.exports = exports = {}; | ||
module.exports.preVersionGeneration = function preVersionGeneration(version) { | ||
return process.env.NYANPASU_VERSION; | ||
}; | ||
|
||
// Next tag e.g. v1.12.3 | ||
module.exports.preTagGeneration = function preTagGeneration(tag) { | ||
return `v${process.env.NYANPASU_VERSION}`; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,41 +39,46 @@ jobs: | |
shell: bash | ||
run: | | ||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | ||
- name: Install | ||
run: pnpm i | ||
- uses: actions/cache@v3 | ||
name: Setup pnpm cache | ||
with: | ||
path: ${{ env.STORE_PATH }} | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- | ||
- name: Install | ||
run: pnpm i | ||
|
||
- id: update-version | ||
shell: bash | ||
name: Bump version | ||
# Use npm because yarn is for some reason not able to output only the version name | ||
run: | | ||
echo "version=$(pnpm run publish)" >> $GITHUB_OUTPUT | ||
echo "version=$(pnpm run publish ${{ inputs.versionType }} | tail -n1)" >> $GITHUB_OUTPUT | ||
git add . | ||
- name: Conventional Changelog Action | ||
id: build-changelog | ||
uses: TriPSs/conventional-changelog-action@v3 | ||
with: | ||
github-token: ${{ secrets.github_token }} | ||
git-message: "chore(release): {version} 🤖 [skip ci]" | ||
git-message: "chore(release): {version} 🤖" | ||
git-user-name: "github-actions[bot]" | ||
git-user-email: "41898282+github-actions[bot]@users.noreply.github.com" | ||
preset: "conventionalcommits" | ||
tag-prefix: "v" | ||
output-file: "UPDATELOG.md" | ||
# output-file: "UPDATELOG.md" # Since v1.4.3, using [email protected] | ||
release-count: "10" | ||
pre-changelog-generation: ".github/conventional-changelog/pre-changelog-generation.js" | ||
config-file-path: ".github/conventional-changelog/config.js" | ||
git-branch: "main" | ||
env: | ||
NYANPASU_VERSION: ${{ steps.update-version.outputs.version }} | ||
|
||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
draft: true | ||
body: ${{steps.build-changelog.outputs.clean_changelog}} | ||
name: ${{steps.update-version.outputs.version}} | ||
name: Clash Nyanpasu v${{steps.update-version.outputs.version}} | ||
tag_name: ${{steps.build-changelog.outputs.tag}} | ||
# target_commitish: ${{ steps.tag.outputs.sha }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.