Skip to content
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
chore: automate releases with release-please
  • Loading branch information
bmish committed Jun 22, 2025
commit 084f9f931bf21c6398fbc3fae0d48aa916f4167e
34 changes: 34 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
on:
push:
branches:
- main

permissions:
contents: write
pull-requests: write
issues: write
id-token: write

name: release-please

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@v4
id: release
with:
release-type: node
- uses: actions/checkout@v4
if: ${{ steps.release.outputs.release_created }}
- uses: actions/setup-node@v4
with:
node-version: lts/*
registry-url: https://registry.npmjs.org
if: ${{ steps.release.outputs.release_created }}
- run: |
npm install --force
npm publish --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
if: ${{ steps.release.outputs.release_created }}
28 changes: 1 addition & 27 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,4 @@
# check-dependency-version-consistency


























# Changelog


## v5.0.0 (2024-12-05)
Expand Down
12 changes: 2 additions & 10 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
# Release Instructions
# Releases

1. Check that notable PRs since the last release are labeled and have clear and consistent titles

2. `git pull` the latest `main` and ensure that `git status` shows no local changes

3. `export GITHUB_AUTH="..."` with a [GitHub access token](https://github.com/settings/tokens/new?scopes=repo&description=release-it) with "repo" access so [release-it](https://github.com/release-it/release-it) can conduct a GitHub release and [lerna-changelog](https://github.com/lerna/lerna-changelog) can download the change history

4. `export EDITOR="vim"` to choose an editor for editing the changelog

5. `yarn release` (uses [@release-it-plugins/lerna-changelog](https://github.com/release-it-plugins/lerna-changelog) to handle versioning, the changelog, publishing to GitHub and NPM, etc)
[release-please](https://github.com/googleapis/release-please) will automatically open up PRs to conduct releases based on [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/).
18 changes: 0 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
"lint:package-json-sorting:fix": "sort-package-json package.json",
"lint:types": "tsc",
"prepublishOnly": "yarn build",
"release": "release-it",
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js --colors --coverage"
},
"dependencies": {
Expand All @@ -58,7 +57,6 @@
},
"devDependencies": {
"@eslint/js": "^9.29.0",
"@release-it-plugins/lerna-changelog": "^7.0.0",
"@types/edit-json-file": "^1.7.0",
"@types/jest": "^29.5.1",
"@types/mock-fs": "^4.13.1",
Expand All @@ -77,7 +75,6 @@
"npm-package-json-lint": "^8.0.0",
"npm-run-all": "^4.1.5",
"prettier": "^3.4.2",
"release-it": "^16.0.0",
"sort-package-json": "^3.0.0",
"ts-jest": "^29.1.0",
"ts-node": "^10.9.2",
Expand All @@ -89,20 +86,5 @@
},
"publishConfig": {
"registry": "https://registry.npmjs.org"
},
"release-it": {
"plugins": {
"@release-it-plugins/lerna-changelog": {
"infile": "CHANGELOG.md",
"launchEditor": true
}
},
"git": {
"tagName": "v${version}"
},
"github": {
"release": true,
"tokenRef": "GITHUB_AUTH"
}
}
}
Loading