Browse Source

Update changelog configuration and release scripts (#2095)

Paweł Kuna 1 month ago
parent
commit
71c68ce40a
5 changed files with 54 additions and 664 deletions
  1. 1 2
      .changeset/config.json
  2. 5 0
      .changeset/swift-crabs-care.md
  3. 14 10
      .github/workflows/release.yml
  4. 4 17
      package.json
  5. 30 635
      pnpm-lock.yaml

+ 1 - 2
.changeset/config.json

@@ -4,8 +4,7 @@
   "commit": false,
   "fixed": [],
   "linked": [],
-  "access": "restricted",
+  "access": "public",
   "baseBranch": "main",
-  "updateInternalDependencies": "patch",
   "ignore": []
 }

+ 5 - 0
.changeset/swift-crabs-care.md

@@ -0,0 +1,5 @@
+---
+"@tabler/core": patch
+---
+
+Update changelog configuration and release scripts

+ 14 - 10
.github/workflows/release.yml

@@ -4,6 +4,7 @@ on:
   push:
     branches:
       - main
+      - dev
 
 permissions:
   contents: read
@@ -15,6 +16,10 @@ jobs:
   release:
     name: Release
     runs-on: ubuntu-latest
+    permissions:
+      contents: write # to create release 
+      issues: write # to post issue comments
+      pull-requests: write # to create pull request
     steps:
       - name: Checkout Repo
         uses: actions/checkout@v4
@@ -32,18 +37,17 @@ jobs:
       - name: Install Dependencies
         run: pnpm install
 
-      - name: Creating .npmrc
-        run: |
-          cat << EOF > "$HOME/.npmrc"
-            //registry.npmjs.org/:_authToken=$NPM_TOKEN
-          EOF
-        env:
-          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
+      - name: Build
+        run: pnpm run build
 
-      - name: Create Release Pull Request
+      - name: Create release Pull Request or publish to NPM
         uses: changesets/action@v1
         with:
-          publish: pnpm release
+          version: pnpm run version
+          publish: pnpm run publish
+          commit: "chore: update versions"
+          title: "chore: update versions"
         env:
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
+          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
+          NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

+ 4 - 17
package.json

@@ -11,7 +11,8 @@
     "preview": "gulp build --preview",
     "svg-optimize": "svgo -f svg/brand --pretty",
     "unused-files": "node .build/unused-files.js",
-    "release": "release-it",
+    "version": "changeset version",
+    "publish": "changeset publish",
     "svg-icons": "node .build/import-icons.js",
     "bundlewatch": "bundlewatch",
     "storybook": "start-storybook -p 6006",
@@ -135,6 +136,7 @@
     "@11ty/eleventy": "^3.0.0",
     "@babel/core": "^7.26.7",
     "@babel/preset-env": "^7.26.7",
+    "@changesets/changelog-github": "^0.5.0",
     "@changesets/cli": "^2.27.12",
     "@rollup/plugin-commonjs": "^24.1.0",
     "@rollup/plugin-node-resolve": "^15.3.1",
@@ -175,7 +177,6 @@
     "plyr": "^3.7.8",
     "postcss": "^8.5.1",
     "prettier": "^2.8.8",
-    "release-it": "^15.11.0",
     "request": "^2.88.2",
     "rollup": "2.79.2",
     "rollup-plugin-babel": "^4.4.0",
@@ -267,21 +268,7 @@
       "optional": true
     }
   },
-  "release-it": {
-    "hooks": {
-      "after:bump": "gulp build --latest-version ${latestVersion} --new-version ${version} && gulp build-demo",
-      "after:release": "echo Successfully released ${name} v${latestVersion} to ${repo.repository}."
-    },
-    "git": {
-      "requireCleanWorkingDir": false,
-      "addUntrackedFiles": true,
-      "tagName": "v${version}"
-    },
-    "github": {
-      "release": true
-    }
-  },
   "directories": {
     "doc": "docs"
   }
-}
+}

File diff suppressed because it is too large
+ 30 - 635
pnpm-lock.yaml


Some files were not shown because too many files changed in this diff