Skip to content

Commit

Permalink
update publish workflow for jsr
Browse files Browse the repository at this point in the history
  • Loading branch information
erik-balfe committed Jul 20, 2024
1 parent 3bc6492 commit 2f61ba2
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 8 deletions.
29 changes: 23 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,37 @@
name: Publish to npm
name: Publish to jsr and npm

on:
release:
types: [created]
push:
branches:
- master

jobs:
build:
publish-to-npm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '20.12.2'
registry-url: 'https://registry.npmjs.org'
node-version: "20.12.2"
registry-url: "https://registry.npmjs.org"
- run: npm ci
- run: npm run build
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
permissions:
contents: read
id-token: write

publish-to-jsr:
runs-on: ubuntu-latest

permissions:
contents: read
id-token: write

steps:
- uses: actions/checkout@v4

- name: Publish package
run: npx jsr publish
5 changes: 5 additions & 0 deletions deno.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "@tyr/brave-search",
"version": "0.5.6",
"exports": "./src/braveSearch.ts"
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "brave-search",
"version": "0.5.5",
"version": "0.5.6",
"description": "A TypeScript library for interacting with the Brave Search API, including web search, local POI search, and automatic summarization features.",
"scripts": {
"build": "tsc",
Expand Down Expand Up @@ -44,4 +44,4 @@
"dependencies": {
"axios": "^1.7.2"
}
}
}

0 comments on commit 2f61ba2

Please sign in to comment.