Skip to content

Commit

Permalink
build: Update release-please (#258)
Browse files Browse the repository at this point in the history
* build: Update release-please

* Fix lint errors
  • Loading branch information
nzakas authored Jul 16, 2024
1 parent f75e14d commit 847e8af
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 19 deletions.
16 changes: 3 additions & 13 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,8 @@ jobs:
pull-requests: write
id-token: write
steps:
- uses: google-github-actions/release-please-action@v3
- uses: googleapis/release-please-action@v4
id: release
with:
release-type: node
package-name: 'eslint-plugin-markdown'
pull-request-title-pattern: 'chore: release ${version}'
changelog-types: >
[
{ "type": "feat", "section": "Features", "hidden": false },
{ "type": "fix", "section": "Bug Fixes", "hidden": false },
{ "type": "perf", "section": "Performance Improvements", "hidden": false }
]
- uses: actions/checkout@v4
if: ${{ steps.release.outputs.release_created }}
- uses: actions/setup-node@v4
Expand All @@ -34,14 +24,14 @@ jobs:
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
if: ${{ steps.release.outputs.release_created }}
- run: 'npx @humanwhocodes/tweet "eslint-plugin-markdown ${{ steps.release.outputs.tag_name }} has been released: ${{ steps.release.outputs.html_url }}"'
- run: 'npx @humanwhocodes/tweet "eslint-plugin-markdown v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}.${{ steps.release.outputs.patch }} has been released: ${{ steps.release.outputs.html_url }}"'
if: ${{ steps.release.outputs.release_created }}
env:
TWITTER_CONSUMER_KEY: ${{ secrets.TWITTER_CONSUMER_KEY }}
TWITTER_CONSUMER_SECRET: ${{ secrets.TWITTER_CONSUMER_SECRET }}
TWITTER_ACCESS_TOKEN_KEY: ${{ secrets.TWITTER_ACCESS_TOKEN_KEY }}
TWITTER_ACCESS_TOKEN_SECRET: ${{ secrets.TWITTER_ACCESS_TOKEN_SECRET }}
- run: 'npx @humanwhocodes/toot "eslint-plugin-markdown ${{ steps.release.outputs.tag_name }} has been released: ${{ steps.release.outputs.html_url }}"'
- run: 'npx @humanwhocodes/toot "eslint-plugin-markdown v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}.${{ steps.release.outputs.patch }} has been released: ${{ steps.release.outputs.html_url }}"'
if: ${{ steps.release.outputs.release_created }}
env:
MASTODON_ACCESS_TOKEN: ${{ secrets.MASTODON_ACCESS_TOKEN }}
Expand Down
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "5.1.0"
}
5 changes: 2 additions & 3 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"use strict";

const processor = require("./processor");
const pkg = require("../package.json");

const rulesConfig = {

Expand All @@ -33,8 +32,8 @@ const rulesConfig = {

const plugin = {
meta: {
name: pkg.name,
version: pkg.version
name: "eslint-plugin-markdown",
version: "5.1.0" // x-release-please-version
},
processors: {
markdown: processor
Expand Down
5 changes: 2 additions & 3 deletions lib/processor.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"use strict";

const parse = require("mdast-util-from-markdown");
const pkg = require("../package.json");

const UNSATISFIABLE_RULES = new Set([
"eol-last", // The Markdown parser strips trailing newlines in code fences
Expand Down Expand Up @@ -412,8 +411,8 @@ function postprocess(messages, filename) {

module.exports = {
meta: {
name: `${pkg.name}/markdown`,
version: pkg.version
name: "eslint-plugin-markdown/markdown",
version: "5.1.0" // x-release-please-version
},
preprocess,
postprocess,
Expand Down
12 changes: 12 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"packages": {
".": {
"release-type": "node",
"pull-request-title-pattern": "chore: release ${version} 🚀",
"extra-files": [
"lib/index.js",
"lib/processor.js"
]
}
}
}

0 comments on commit 847e8af

Please sign in to comment.