Skip to content

Commit

Permalink
Fix: Make release-it works
Browse files Browse the repository at this point in the history
  • Loading branch information
wellyshen committed Jun 21, 2024
1 parent 73ba654 commit 3861ac0
Show file tree
Hide file tree
Showing 7 changed files with 1,141 additions and 1,371 deletions.
1 change: 0 additions & 1 deletion .github/workflows/hovercards-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ jobs:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Release
working-directory: web/packages/hovercards
run: npx release-it ${{ github.event.inputs.increment }} --ci
env:
GITHUB_TOKEN: ${{ secrets.GRAVATAR_GITHUB_TOKEN }}
Expand Down
29 changes: 29 additions & 0 deletions .release-it.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"$schema": "https://unpkg.com/release-it@17/schema/release-it.json",
"git": {
"requireCleanWorkingDir": false,
"commitMessage": "chore: release ${name} v${version}",
"changelog": "npx auto-changelog --stdout --commit-limit false -u --template https://raw.githubusercontent.com/release-it/release-it/main/templates/changelog-compact.hbs"
},
"github": {
"release": true,
"assets": ["web/packages/*/release/*.zip"]
},
"npm": {
"publish": false
},
"hooks": {
"before:init": [
"git pull",
"cd web/packages/${name}",
"npm install",
"npm run build",
"npm run clean:release",
"mkdir -p release/${name}",
"cp -r dist/* release/${name}",
"(cd release; zip -r ${name}.zip ${name}/*)"
],
"after:bump": "npx auto-changelog -p",
"after:release": "echo 🎉 Successfully released ${name} v${version} to ${repo.repository}."
}
}
Loading

0 comments on commit 3861ac0

Please sign in to comment.