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(release): auto update version with senmatic release #22

Merged
merged 2 commits into from
Jan 3, 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
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
Loading