Skip to content

Commit

Permalink
chore: setup publish to jsr
Browse files Browse the repository at this point in the history
  • Loading branch information
kravetsone committed May 30, 2024
1 parent 9670f79 commit 80cc495
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
17 changes: 16 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on: workflow_dispatch

permissions:
contents: write
id-token: write

jobs:
publish_package:
Expand All @@ -25,14 +26,26 @@ jobs:
- name: Install modules
run: bun install

- name: Prepare to JSR publish
run: bun jsr

- name: Type-check
run: tsc --noEmit

- name: Setup Deno
uses: denoland/setup-deno@v1

- name: Publish package to JSR
run: deno publish --allow-dirty --unstable-sloppy-imports --allow-slow-types

- name: Install Node
uses: actions/setup-node@v4
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
scope: "@gramio"

- name: Publish package
- name: Publish package to NPM
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand All @@ -44,4 +57,6 @@ jobs:
tag: v${{ steps.changelog.outputs.version }}
name: v${{ steps.changelog.outputs.version }}
body: ${{ steps.changelog.outputs.changelog }}
draft: false
prerelease: false
generateReleaseNotes: true
12 changes: 12 additions & 0 deletions deno.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "@gramio/scenes",
"version": "0.0.1",
"exports": "./src/index.ts",
"publish": {
"include": ["deno.json", "src", "README.md", "tsconfig.json"]
},
"imports": {
"gramio": "jsr:@gramio/core@^0.0.39",
"middleware-io": "npm:middleware-io@^2.8.1"
}
}

0 comments on commit 80cc495

Please sign in to comment.