Skip to content

Commit

Permalink
chore: release-please
Browse files Browse the repository at this point in the history
  • Loading branch information
aladdin-add committed May 2, 2024
1 parent 241323d commit 4aa041b
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/release-please/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"plugins": ["node-workspace"],
"bump-minor-pre-major": true,
"packages": {
"packages/autofix": { "release-type": "node" },
"packages/no-autofix": { "release-type": "node" },
"packages/web": { "release-type": "node" }
}
}
5 changes: 5 additions & 0 deletions .github/release-please/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"packages/autofix": "1.1.0",
"packages/no-autofix": "1.2.3",
"packages/web": "0.0.3"
}
67 changes: 67 additions & 0 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
on:
push:
branches:
- master

name: release-please

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

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: GoogleCloudPlatform/release-please-action@v4
id: release
with:
token: ${{secrets.GITHUB_TOKEN}}
config-file: .github/release-please/config.json
manifest-file: .github/release-please/manifest.json

# Output which releases were created
- run: echo "A release was created."
if: ${{ steps.release.outputs.releases_created }}

# Check to see if we need to do any releases and if so check out the repo
- uses: actions/checkout@v4
if: ${{ steps.release.outputs.releases_created }}

# Node.js release
- uses: actions/setup-node@v4
if: ${{ steps.release.outputs.releases_created }}
with:
node-version: lts/*
registry-url: "https://registry.npmjs.org"

#-----------------------------------------------------------------------------
# eslint-plugin-autofix
#-----------------------------------------------------------------------------

- name: Publish eslint-plugin-autofix package to npm
run: npm publish -w packages/autofix
if: ${{ steps.release.outputs['packages/autofix--release_created'] }}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

#-----------------------------------------------------------------------------
# eslint-plugin-no-autofix
#-----------------------------------------------------------------------------

- name: Publish eslint-plugin-no-autofix package to npm
run: npm publish -w packages/no-autofix
if: ${{ steps.release.outputs['packages/no-autofix--release_created'] }}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

#-----------------------------------------------------------------------------
# eslint-plugin-web
#-----------------------------------------------------------------------------

- name: Publish eslint-plugin-web package to npm
run: npm publish -w packages/web
if: ${{ steps.release.outputs['packages/web--release_created'] }}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

0 comments on commit 4aa041b

Please sign in to comment.