-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Installing and configuring Auto (#476)
* Installing and configuring Auto Installing Auto (https://intuit.github.io/auto/index) for automated publishing. Since this repo has a number of labels already, I disabled the default labels and added custom entries to match the labels that were created. I created a basic workflow for releasing that doesn't have anything lerna specific (although `lerna` is used internally with `auto`) but run the `release` npm script (which is `auto shipit --dry-run -v` for now). Testing locally I ran into an issue where an lerna error will be thrown. This issue seems to be known (see intuit/auto#2129) with a workaround by adding a "registry" entry to lerna.json (although seems to continue to fail with --dry-run option). * Removing dry-run from shipit After testing the lerna comands locally, I'm removing `--dry-run` to test publishing canary versions in a pull-request. * adding `very verbose` logging to diagnose lerna command timeout * Consistent use of `prepare` and `npm-run-all` Using `prepare` npm lifecycle script for all packages (as opposed to prepublishOnly) and consistently using `npm-run-all` for any package that has multiple scripts to run during `prepare`. * upgrading gh actions and adding more npm logging * dropping npm-run-all * Turning down the logging level
- Loading branch information
Nathan Stilwell
authored
Oct 17, 2022
1 parent
ed7256c
commit 603b1f0
Showing
7 changed files
with
792 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Based on https://intuit.github.io/auto/docs/build-platforms/github-actions | ||
name: Release | ||
|
||
on: [push] | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
cache: 'yarn' | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
- name: Create Release | ||
env: #Tokens generated under github account: https://github.com/nathanstilwell | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
run: | | ||
yarn install --frozen-lockfile | ||
yarn run release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,14 +2,51 @@ | |
"name": "root", | ||
"private": true, | ||
"devDependencies": { | ||
"lerna": "5.6.2" | ||
"auto": "^10.37.6", | ||
"lerna": "^5.6.2" | ||
}, | ||
"scripts": { | ||
"init": "yarn install && yarn lerna run build", | ||
"start": "lerna run start --parallel" | ||
"start": "lerna run start --parallel", | ||
"release": "auto shipit -v" | ||
}, | ||
"resolutions": {}, | ||
"workspaces": [ | ||
"packages/*" | ||
] | ||
], | ||
"repository": "cockroachdb/ui", | ||
"author": "Cockroach Labs <[email protected]>", | ||
"auto": { | ||
"plugins": [ | ||
"npm" | ||
], | ||
"noDefaultLabels": true, | ||
"labels": [ | ||
{ | ||
"releaseType": "major", | ||
"name": "🤖 major" | ||
}, | ||
{ | ||
"releaseType": "minor", | ||
"name": "🤖 minor" | ||
}, | ||
{ | ||
"releaseType": "patch", | ||
"name": "🤖 patch" | ||
}, | ||
{ | ||
"releaseType": "major", | ||
"name": "🤖 major" | ||
}, | ||
{ | ||
"releaseType": "skip", | ||
"name": "🤖 skip-release" | ||
}, | ||
{ | ||
"releaseType": "none", | ||
"name": ":memo: docs", | ||
"changelogTitle": "📝 Documentation" | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.