Skip to content

Commit

Permalink
build: Publish to JSR and update release-please config (#10)
Browse files Browse the repository at this point in the history
* build: Publish to JSR and update release-please config

* Revert release-please-config.json

* Update version number in tweet/toot
  • Loading branch information
nzakas authored Jul 12, 2024
1 parent 48545eb commit 576e899
Showing 1 changed file with 16 additions and 4 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 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/json ${{ steps.release.outputs.tag_name }} has been released: ${{ steps.release.outputs.html_url }}"'

- name: Toot release announcement
run: 'npx @humanwhocodes/toot "eslint/json 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

0 comments on commit 576e899

Please sign in to comment.