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
46 changes: 46 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
on:
push:
branches:
- main

permissions:
contents: write
pull-requests: write

name: release-please

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v4
id: release
with:
release-type: node
package-name: 'eslint-doc-generator'
pull-request-title-pattern: 'chore: release${component} ${version}'
changelog-types: >
[
{ "type": "feat", "section": "Features", "hidden": false },
{ "type": "fix", "section": "Bug Fixes", "hidden": false },
{ "type": "docs", "section": "Documentation", "hidden": false },
{ "type": "build", "section": "Chores", "hidden": false },
{ "type": "chore", "section": "Chores", "hidden": false },
{ "type": "perf", "section": "Chores", "hidden": false },
{ "type": "ci", "section": "Chores", "hidden": false },
{ "type": "refactor", "section": "Chores", "hidden": false },
{ "type": "test", "section": "Chores", "hidden": false }
]
- 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 }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ Alternatively, you can configure your scripts to run `prettier` after this tool:

This tool follows [semantic versioning](https://semver.org/).

New features will be released as a minor version, while bug fixes will be released as a patch version.
New features will be [released](./RELEASE.md) as a minor version, while bug fixes will be released as a patch version.

Breaking changes will be released as a major version and include:

Expand Down
10 changes: 1 addition & 9 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
# 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. `npm run 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/).
Loading