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

feat: update auto bump version #26

Merged
merged 1 commit into from
Jan 6, 2025
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
12 changes: 2 additions & 10 deletions .github/workflows/publish-nt-css.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,8 @@ jobs:
- name: Install pnpm
run: npm install -g pnpm

- name: Set up PNPM_HOME and PATH
run: |
echo "PNPM_HOME=$HOME/.local/share/pnpm" >> $GITHUB_ENV
echo "PATH=$HOME/.local/share/pnpm:$PATH" >> $GITHUB_ENV
mkdir -p $HOME/.local/share/pnpm
export PNPM_HOME=$HOME/.local/share/pnpm
export PATH=$PNPM_HOME:$PATH

- name: Install dependencies
run: pnpm install
run: pnpm install --frozen-lockfile
working-directory: apps/nt-stylesheet

- name: Test CSS framework
Expand All @@ -44,7 +36,7 @@ jobs:
working-directory: apps/nt-stylesheet

- name: Publish to npm
run: npx semantic-release
run: npx semantic-release-plus
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
Expand Down
9 changes: 8 additions & 1 deletion apps/nt-stylesheet/project.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
{
"name": "nt-stylesheet",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"targets": {
"release": {
"executor": "nx:run-commands",
"outputs": [],
"options": {
"command": "npx semantic-release-plus --extends ./apps/nt-stylesheet/release.config.js"
}
}
}
}

32 changes: 32 additions & 0 deletions apps/nt-stylesheet/release.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
const name = '@nashtech/nt-stylesheet'
const srcRoot = `apps/nt-stylesheet`

module.exports = {
extends: '../../release.config.base.cjs',
pkgRoot: `dist/`,
tagFormat: name + '-v${version}',
commitPaths: [`${srcRoot}/*`],
plugins: [
'@semantic-release/commit-analyzer',
'@semantic-release/release-notes-generator',
[
'@semantic-release/changelog',
{
changelogFile: `${srcRoot}/CHANGELOG.md`,
},
],
'@semantic-release/npm',
[
'@semantic-release/git',
{
assets: [
`${srcRoot}/package.json`,
`${srcRoot}/CHANGELOG.md`,
],
message:
`release(version): Release ${name} ` +
'${nextRelease.version} [skip ci]\n\n${nextRelease.notes}',
},
],
],
}
20 changes: 13 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@
"devDependencies": {
"@nrwl/eslint-plugin-nx": "^19.8.4",
"@nrwl/linter": "^19.8.4",
"husky": "^9.0.11",
"lint-staged": "13.2.3",
"nx": "^20.0.1",
"prettier": "3.0.1",
"semantic-release": "^24.2.1",
"@nx/eslint-plugin": "^20.3.0",
"@trivago/prettier-plugin-sort-imports": "^5.2.1",
"@typescript-eslint/eslint-plugin": "^8.19.0",
"@typescript-eslint/parser": "^8.19.0",
"eslint": "^9.17.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1"
"eslint-plugin-prettier": "^5.2.1",
"husky": "^9.0.11",
"lint-staged": "13.2.3",
"nx": "^20.0.1",
"prettier": "3.0.1",
"semantic-release": "^24.2.1"
},
"pnpm": {
"overrides": {
Expand All @@ -45,5 +45,11 @@
"bugs": {
"url": "https://github.com/nashtech-garage/nt-sketchbook/issues"
},
"homepage": "https://github.com/nashtech-garage/nt-sketchbook#readme"
"homepage": "https://github.com/nashtech-garage/nt-sketchbook#readme",
"dependencies": {
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"semantic-release-npm-github-publish": "^1.5.5",
"semantic-release-plus": "^20.0.0"
}
}
Loading
Loading