Skip to content

Commit

Permalink
Publish to JSR
Browse files Browse the repository at this point in the history
  • Loading branch information
lambdalisue committed May 12, 2024
1 parent 000af2a commit d6b0e61
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 7 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/jsr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: jsr

env:
DENO_VERSION: 1.x

on:
push:
tags:
- "v*"

permissions:
contents: read
id-token: write

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: denoland/setup-deno@v1
with:
deno-version: ${{ env.DENO_VERSION }}
- name: Publish
run: |
deno run -A jsr:@david/[email protected]
11 changes: 11 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,14 @@ jobs:
- name: Benchmark
run: |
deno task bench | aha --no-header >> $GITHUB_STEP_SUMMARY
jsr-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v1
with:
deno-version: ${{ env.DENO_VERSION }}
- name: Publish (dry-run)
run: |
deno publish --dry-run
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# workerio

[![deno land](http://img.shields.io/badge/available%20on-deno.land/x-lightgrey.svg?logo=deno)](https://deno.land/x/workerio)
[![deno doc](https://doc.deno.land/badge.svg)](https://doc.deno.land/https/deno.land/x/workerio/mod.ts)
[![JSR](https://jsr.io/badges/@lambdalisue/workerio)](https://jsr.io/@lambdalisue/workerio)
[![Test](https://github.com/lambdalisue/deno-workerio/actions/workflows/test.yml/badge.svg)](https://github.com/lambdalisue/deno-workerio/actions/workflows/test.yml)
[![codecov](https://codecov.io/gh/lambdalisue/deno-workerio/graph/badge.svg?token=6Q1iOBg2Ka)](https://codecov.io/gh/lambdalisue/deno-workerio)

Expand All @@ -21,7 +20,7 @@
import {
readableStreamFromWorker,
writableStreamFromWorker,
} from "https://deno.land/x/workerio@$MODULE_VERSION/mod.ts";
} from "@lambdalisue/workerio";

const decoder = new TextDecoder();
const encoder = new TextEncoder();
Expand Down Expand Up @@ -50,7 +49,7 @@ for await (const data of reader) {
import {
readableStreamFromWorker,
writableStreamFromWorker,
} from "https://deno.land/x/workerio@$MODULE_VERSION/mod.ts";
} from "@lambdalisue/workerio";

const decoder = new TextDecoder();
const encoder = new TextEncoder();
Expand Down
21 changes: 20 additions & 1 deletion deno.jsonc
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
{
"name": "@lambdalisue/workerio",
"version": "0.0.0",
"exports": {
".": "./mod.ts",
"./readable_stream": "./readable_stream.ts",
"./writable_stream": "./writable_stream.ts"
},
"publish": {
"include": ["LICENSE", "README.md", "**/*.ts"],
"exclude": [
"./readable_stream_bench.ts",
"./readable_stream_test.ts",
"./test_bench.ts",
"./test_echo_server.ts",
"./test_util.ts",
"./writable_stream_bench.ts",
"./writable_stream_test.ts"
]
},
"tasks": {
"check": "deno check **/*.ts",
"test": "deno test -A --doc --parallel --shuffle",
Expand All @@ -11,6 +30,6 @@
"imports": {
"@std/assert": "jsr:@std/assert@^0.225.1",
"@std/bytes": "jsr:@std/bytes@^0.224.0",
"https://deno.land/x/workerio@$MODULE_VERSION/": "./"
"@lambdalisue/workerio": "./mod.ts"
}
}
4 changes: 2 additions & 2 deletions mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* import {
* readableStreamFromWorker,
* writableStreamFromWorker,
* } from "https://deno.land/x/workerio@$MODULE_VERSION/mod.ts";
* } from "@lambdalisue/workerio";
*
* const decoder = new TextDecoder();
* const encoder = new TextEncoder();
Expand Down Expand Up @@ -44,7 +44,7 @@
* import {
* readableStreamFromWorker,
* writableStreamFromWorker,
* } from "https://deno.land/x/workerio@$MODULE_VERSION/mod.ts";
* } from "@lambdalisue/workerio";
*
* const decoder = new TextDecoder();
* const encoder = new TextEncoder();
Expand Down

0 comments on commit d6b0e61

Please sign in to comment.