From c97dc0c1a584abe7ef0c11412dc13d15cc944011 Mon Sep 17 00:00:00 2001 From: Huakun Shen Date: Tue, 28 Jan 2025 08:55:02 -0500 Subject: [PATCH] chore: set up JSR package configuration and publish workflow --- .github/workflows/jsr-publish.yml | 27 +++++++++++++++++++++++++++ jsr.json | 14 ++++++++++++++ mod.ts | 0 3 files changed, 41 insertions(+) create mode 100644 .github/workflows/jsr-publish.yml create mode 100644 jsr.json create mode 100644 mod.ts diff --git a/.github/workflows/jsr-publish.yml b/.github/workflows/jsr-publish.yml new file mode 100644 index 0000000..1e8fe68 --- /dev/null +++ b/.github/workflows/jsr-publish.yml @@ -0,0 +1,27 @@ +name: Publish +on: + push: + branches: + - main + +jobs: + publish: + runs-on: ubuntu-latest + + permissions: + contents: read + id-token: write + + steps: + - uses: actions/checkout@v4 + - uses: oven-sh/setup-bun@v2 + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: "22" + - uses: oven-sh/setup-bun@v2 + - run: | + bun install + bun run build + - name: Publish package + run: bunx jsr publish diff --git a/jsr.json b/jsr.json new file mode 100644 index 0000000..c808006 --- /dev/null +++ b/jsr.json @@ -0,0 +1,14 @@ +{ + "name": "@kunkun/kunkun-ext-youtube-downloader", + "version": "0.1.0", + "license": "MIT", + "exports": "./mod.ts", + "imports": { + "@distube/yt-dlp": "npm:@distube/yt-dlp@^2.0.1", + "@distube/ytdl-core": "npm:@distube/ytdl-core@^4.15.9", + "@hk/photographer-toolbox": "jsr:@hk/photographer-toolbox@^0.1.12", + "@kunkun/api": "jsr:@kunkun/api@^0.0.52", + "@std/assert": "jsr:@std/assert@1", + "fluent-ffmpeg": "npm:fluent-ffmpeg@^2.1.3" + } +} diff --git a/mod.ts b/mod.ts new file mode 100644 index 0000000..e69de29