Skip to content

Commit fab31ec

Browse files
authored
Merge pull request #1 from Beyond-Better/staging
Initial publish
2 parents e276c78 + a0b75f0 commit fab31ec

109 files changed

Lines changed: 10950 additions & 2376 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/publish.yaml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Publish to JSR
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
workflow_dispatch:
8+
inputs:
9+
version:
10+
description: 'Version to publish (e.g., 1.0.0)'
11+
required: true
12+
type: string
13+
14+
jobs:
15+
publish:
16+
name: Publish Package
17+
runs-on: ubuntu-latest
18+
19+
permissions:
20+
contents: read
21+
id-token: write
22+
23+
steps:
24+
- name: Checkout repository
25+
uses: actions/checkout@v4
26+
27+
- name: Setup Deno
28+
uses: denoland/setup-deno@v1
29+
with:
30+
deno-version: v2.x
31+
32+
- name: Verify formatting
33+
run: deno fmt --check
34+
35+
- name: Run linter
36+
run: deno lint
37+
38+
- name: Type check
39+
run: deno task check
40+
41+
- name: Run tests
42+
run: deno task test
43+
44+
- name: Extract version from tag or input
45+
id: version
46+
run: |
47+
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
48+
VERSION="${{ github.event.inputs.version }}"
49+
else
50+
VERSION=${GITHUB_REF#refs/tags/v}
51+
fi
52+
echo "version=$VERSION" >> $GITHUB_OUTPUT
53+
echo "Publishing version: $VERSION"
54+
55+
- name: Update version in deno.jsonc
56+
run: |
57+
VERSION="${{ steps.version.outputs.version }}"
58+
sed -i "s/\"version\": \".*\"/\"version\": \"$VERSION\"/" deno.jsonc
59+
echo "Updated deno.jsonc version to $VERSION"
60+
cat deno.jsonc | grep version
61+
62+
- name: Generate version.ts from deno.jsonc
63+
run: deno task update-version
64+
65+
- name: Publish to JSR
66+
run: deno publish --allow-dirty

.github/workflows/test.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- develop
8+
pull_request:
9+
branches:
10+
- main
11+
- develop
12+
13+
jobs:
14+
test:
15+
name: Run Tests
16+
runs-on: ubuntu-latest
17+
18+
permissions:
19+
contents: read
20+
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@v4
24+
25+
- name: Setup Deno
26+
uses: denoland/setup-deno@v1
27+
with:
28+
deno-version: v2.x
29+
30+
- name: Verify formatting
31+
run: deno fmt --check
32+
33+
- name: Run linter
34+
run: deno task lint
35+
36+
- name: Type check
37+
run: deno task check
38+
39+
- name: Run tests
40+
run: deno task test
41+
42+
- name: Generate coverage
43+
run: deno task test:coverage
44+
45+
- name: Upload coverage to Codecov
46+
uses: codecov/codecov-action@v4
47+
with:
48+
files: ./tests/coverage/lcov.info
49+
fail_ci_if_error: false
50+
env:
51+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
.trash/
33
.BBEditLSPWorkspaceConfig.json
44

5-
node_modules
5+
node_modules
6+
coverage

0 commit comments

Comments
 (0)