Skip to content

Commit c217db8

Browse files
committed
feat(ci): add GitHub Actions CI and JSR publish 🐇
- Add CI badge to README linking to workflow - Add CI workflow for format, lint, typecheck, and test on main - Add publish workflow to publish to JSR on push to main
1 parent eef50c7 commit c217db8

3 files changed

Lines changed: 60 additions & 1 deletion

File tree

.github/workflows/ci.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
build-check:
11+
name: Build Check
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
18+
- name: Setup Deno
19+
uses: denoland/setup-deno@v2
20+
with:
21+
deno-version: v2.5.4
22+
23+
- name: Format check
24+
run: deno fmt --check src/
25+
26+
- name: Lint
27+
run: deno lint src/
28+
29+
- name: Type check
30+
run: deno check src/index.ts
31+
32+
- name: Test
33+
run: deno test --allow-read --allow-write --allow-env

.github/workflows/publish.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
deno-publish:
10+
name: Deno (JSR)
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
id-token: write
15+
16+
steps:
17+
- uses: actions/checkout@v6
18+
- uses: denoland/setup-deno@v2
19+
with:
20+
deno-version: v2.5.4
21+
22+
- name: Check package
23+
run: deno check src/index.ts
24+
25+
- name: Publish to JSR
26+
run: deno publish --allow-dirty

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Anonymous ID: request, decode, verify time-bound. No server, no storage.
66

77
[![Node](https://img.shields.io/badge/node-%3E%3D20-339933?logo=node.js&logoColor=white)](https://nodejs.org) [![Deno](https://img.shields.io/badge/deno-compatible-ffcb00?logo=deno&logoColor=000000)](https://deno.com) [![Bun](https://img.shields.io/badge/bun-compatible-f9f1e1?logo=bun&logoColor=000000)](https://bun.sh) [![Browser](https://img.shields.io/badge/browser-compatible-4285F4?logo=googlechrome&logoColor=white)](https://developer.mozilla.org/en-US/docs/Web/JavaScript)
88

9-
[![Module type: ESM](https://img.shields.io/badge/module%20type-esm-brightgreen)](https://github.com/NeaByteLab/Trustless-ID) [![npm version](https://img.shields.io/npm/v/@neabyte/trustless-id.svg)](https://www.npmjs.org/package/@neabyte/trustless-id) [![JSR](https://jsr.io/badges/@neabyte/trustless-id)](https://jsr.io/@neabyte/trustless-id) [![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
9+
[![Module type: ESM](https://img.shields.io/badge/module%20type-esm-brightgreen)](https://github.com/NeaByteLab/Trustless-ID) [![npm version](https://img.shields.io/npm/v/@neabyte/trustless-id.svg)](https://www.npmjs.org/package/@neabyte/trustless-id) [![JSR](https://jsr.io/badges/@neabyte/trustless-id)](https://jsr.io/@neabyte/trustless-id) [![CI](https://github.com/NeaByteLab/Trustless-ID/actions/workflows/ci.yaml/badge.svg)](https://github.com/NeaByteLab/Trustless-ID/actions/workflows/ci.yaml) [![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
1010

1111
</div>
1212

0 commit comments

Comments
 (0)