Skip to content

Commit

Permalink
Switch to beachball for changelog management (#7)
Browse files Browse the repository at this point in the history
* remove changesets and add beachball

* update tokens
  • Loading branch information
yashincontrol authored Mar 21, 2023
1 parent fb39267 commit c227f87
Show file tree
Hide file tree
Showing 8 changed files with 308 additions and 824 deletions.
8 changes: 0 additions & 8 deletions .changeset/README.md

This file was deleted.

11 changes: 0 additions & 11 deletions .changeset/config.json

This file was deleted.

35 changes: 35 additions & 0 deletions .github/workflows/publish-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Publish dev pre-release NPM packages

on: workflow_dispatch

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.IMJS_ADMIN_GH_TOKEN }}

- name: Use Node.js 18
uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://registry.npmjs.org/

- name: Install pnpm
uses: pnpm/[email protected]
with:
version: 7.28.0

- name: Install dependencies
run: pnpm install --frozen-lockfile=true

- name: Run Tests
run: pnpm run cover

- name: Publish packages
env:
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_PUBLISH_ITWIN }}
run: pnpm publish-packages-dev -y --branch ${{ github.ref_name }} --message "Version bump [skip actions]"

11 changes: 7 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.IMJS_ADMIN_GH_TOKEN }}

- name: Use Node.js 18
uses: actions/setup-node@v3
Expand All @@ -25,8 +28,8 @@ jobs:
- name: Run Tests
run: pnpm run cover

- name: Publish Changeset and Package to NPM
- name: Publish packages
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
run: npx changeset publish
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_PUBLISH_ITWIN }}
run: pnpm publish-packages -y --branch ${{ github.ref_name }} --message "Version bump [skip actions]"

14 changes: 14 additions & 0 deletions beachball.config.dev.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
const base = require("./beachball.config.js");

/** @type {import("beachball").BeachballConfig } */
module.exports = {
...base,
tag: "nightly",
prereleasePrefix: "dev",
generateChangelog: false,
gitTags: false,
};
21 changes: 21 additions & 0 deletions beachball.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
/** @type {import("beachball").BeachballConfig } */
module.exports = {
bumpDeps: false,
access: "public",
tag: "latest",
ignorePatterns: [
".nycrc",
".eslintrc.json",
".mocharc.json",
"tsconfig.*",
".*ignore",
".github/**",
".vscode/**",
"pnpm-lock.yaml",
],
changehint: "Run 'pnpm change' to generate a change file",
};
12 changes: 8 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@itwin/eslint-plugin",
"version": "4.0.0-dev.14",
"version": "4.0.0-dev.30",
"description": "ESLint plugin with default configuration and custom rules for iTwin.js projects",
"license": "MIT",
"keywords": [
Expand All @@ -21,8 +21,12 @@
"build": "",
"test": "mocha \"tests/*.js\"",
"cover": "npm -s test",
"change": "npx changeset",
"version": "npx changeset version"
"change": "beachball change",
"check": "beachball check",
"version-bump": "beachball bump",
"version-bump-dev": "beachball bump --config beachball.config.dev.js --keep-change-files",
"publish-packages": "beachball publish",
"publish-packages-dev": "beachball publish --config beachball.config.dev.js --keep-change-files"
},
"author": {
"name": "Bentley Systems, Inc.",
Expand All @@ -48,11 +52,11 @@
"typescript": "^3.7.0 || ^4.0.0"
},
"devDependencies": {
"@changesets/cli": "^2.26.0",
"@types/eslint": "~7.2.13",
"@types/estree": "~0.0.48",
"@types/node": "^18.11.5",
"@typescript-eslint/typescript-estree": "~4.31.0",
"beachball": "^2.31.12",
"eslint": "^7.11.0",
"mocha": "^10.0.0",
"typescript": "~4.4.0"
Expand Down
Loading

0 comments on commit c227f87

Please sign in to comment.