Skip to content

Commit

Permalink
feat(release): auto update version with senmatic release (#22)
Browse files Browse the repository at this point in the history
* feat(release): auto update version with senmatic release
  • Loading branch information
khoilen authored Jan 3, 2025
1 parent 71f48a7 commit cabb506
Show file tree
Hide file tree
Showing 6 changed files with 1,677 additions and 13 deletions.
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

13 changes: 4 additions & 9 deletions .github/workflows/publish-nt-css.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'

- name: Authenticate with npm
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_ACCESS_TOKEN }}" > ~/.npmrc

Expand All @@ -33,14 +35,6 @@ jobs:
run: pnpm install
working-directory: apps/nt-stylesheet

- name: Update package version
run: |
TAG=${{ github.event.release.tag_name }}
echo "Using release tag: $TAG"
pnpm version $TAG --no-git-tag-version || true
cat apps/nt-stylesheet/package.json | grep version
working-directory: apps/nt-stylesheet

- name: Test CSS framework
run: pnpm run test
working-directory: apps/nt-stylesheet
Expand All @@ -50,7 +44,8 @@ jobs:
working-directory: apps/nt-stylesheet

- name: Publish to npm
run: pnpm publish --no-git-checks
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
working-directory: apps/nt-stylesheet
5 changes: 3 additions & 2 deletions apps/nt-stylesheet/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"name": "@nashtech/nt-stylesheet",
"version": "1.1.16",
"version": "0.0.0-development",
"description": "Style sheet for the NT Design System",
"packageManager": "[email protected]",
"scripts": {
"build": "pnpm vite build",
"test": "npx vitest"
"test": "npx vitest",
"semantic-release": "semantic-release"
},
"bin": {
"@nashtech/nt-stylesheet": "bin/init-tailwind.js"
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"husky": "^9.0.11",
"lint-staged": "13.2.3",
"nx": "^20.0.1",
"prettier": "3.0.1"
"prettier": "3.0.1",
"semantic-release": "^24.2.1"
},
"pnpm": {
"overrides": {
Expand Down
Loading

0 comments on commit cabb506

Please sign in to comment.