Skip to content

Commit

Permalink
try to publish to JSR of deno
Browse files Browse the repository at this point in the history
  • Loading branch information
suhaotian committed Nov 15, 2024
1 parent df97446 commit 94733bd
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/release-deno.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Release

on:
push:
branches:
- deno-jsr

jobs:
release:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x]

if: startsWith(github.ref, 'refs/tags/v')
permissions:
id-token: write
steps:
- name: Check out
uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'

- name: Move files to ./deno folder
run: cp ./deno/deno.json README.md Mock-plugin.md CHANGELOG.md ./src/ && rm -f package.json

- name: Publish package to JSR of deno
run: cd src && ls && npx jsr publish
20 changes: 20 additions & 0 deletions deno/deno.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "@suhaotian/xior",
"version": "0.1.0",
"exports": {
".": "./index.ts",
"./utils": "./utils.ts",
"./plugins/error-retry": "./plugins/error-retry.ts",
"./plugins/throttle": "./plugins/throttle.ts",
"./plugins/dedupe": "./plugins/dedupe.ts",
"./plugins/cache": "./plugins/cache.ts",
"./plugins/progress": "./plugins/progress.ts",
"./plugins/mock": "./plugins/mock.ts",
"./plugins/error-cache": "./plugins/error-cache.ts",
"./plugins/token-refresh": "./plugins/token-refresh.ts"
},
"imports": {
"ts-deepmerge": "npm:ts-deepmerge@^7.0.0",
"tiny-lru": "npm:tiny-lru@^11.2.5"
}
}

0 comments on commit 94733bd

Please sign in to comment.