Skip to content

Commit

Permalink
build: Publish to JSR and update release-please config
Browse files Browse the repository at this point in the history
  • Loading branch information
nzakas committed Jul 9, 2024
1 parent 48545eb commit 9025c9d
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 18 deletions.
20 changes: 16 additions & 4 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,33 @@ jobs:
node-version: lts/*
registry-url: https://registry.npmjs.org
if: ${{ steps.release.outputs.release_created }}
- run: |

- name: Publish to npm
run: |
npm install
npm run build
npm run build --if-present
npm publish --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
if: ${{ steps.release.outputs.release_created }}
- run: 'npx @humanwhocodes/tweet "eslint/json ${{ steps.release.outputs.tag_name }} has been released: ${{ steps.release.outputs.html_url }}"'

- name: Publish to JSR
run: |
npm run build --if-present
npx jsr publish
if: ${{ steps.release.outputs.release_created }}

- name: Tweet release announcement
run: 'npx @humanwhocodes/tweet "eslint/json ${{ steps.release.outputs.tag_name }} 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/json ${{ steps.release.outputs.tag_name }} has been released: ${{ steps.release.outputs.html_url }}"'

- name: Toot release announcement
run: 'npx @humanwhocodes/toot "eslint/json ${{ steps.release.outputs.tag_name }} has been released: ${{ steps.release.outputs.html_url }}"'
if: ${{ steps.release.outputs.release_created }}
env:
MASTODON_ACCESS_TOKEN: ${{ secrets.MASTODON_ACCESS_TOKEN }}
Expand Down
23 changes: 9 additions & 14 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
{
"bootstrap-sha": "505795a1312e90f1ce3b59b530622929bc38b4fe",
"last-release-sha": "48545ebe503d661af0562b240648253199758d9f",
"bump-minor-pre-major": true,
"packages": {
".": {
"release-type": "node",
"release-as": "0.1.0",
"pull-request-title-pattern": "chore: release ${version} 🚀",
"extra-files": [
{
"type": "json",
"path": "jsr.json",
"jsonpath": "$.version"
}
]
"release-type": "node",
"pull-request-title-pattern": "chore: release ${version} 🚀",
"extra-files": [
{
"type": "json",
"path": "jsr.json",
"jsonpath": "$.version"
}
}
]
}

0 comments on commit 9025c9d

Please sign in to comment.