File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ {
2+ "$schema" : " https://unpkg.com/@changesets/config@3.0.3/schema.json" ,
3+ "changelog" : [
4+ " @changesets/changelog-github" ,
5+ { "repo" : " vnphanquang/githooks" }
6+ ],
7+ "commit" : false ,
8+ "fixed" : [],
9+ "linked" : [],
10+ "access" : " public" ,
11+ "baseBranch" : " main" ,
12+ "updateInternalDependencies" : " patch" ,
13+ "ignore" : []
14+ }
Original file line number Diff line number Diff line change 1+ ---
2+ " @vnphanquang/githooks " : major
3+ ---
4+
5+ 1.0.0 - Here be dragons
Original file line number Diff line number Diff line change @@ -11,3 +11,5 @@ indent_size = 2
1111trim_trailing_whitespace = true
1212max_line_length = 100
1313
14+ [* .yaml ]
15+ indent_style = space
Original file line number Diff line number Diff line change 1+ name : Changesets
2+ on :
3+ push :
4+ branches :
5+ - main
6+ paths :
7+ - " .changeset/**"
8+ - " .github/workflows/changesets.yaml"
9+ workflow_dispatch :
10+
11+ env :
12+ CI : true
13+ jobs :
14+ Version :
15+ if : github.repository == 'vnphanquang/githooks' # prevents this action from running on forks
16+ permissions :
17+ contents : write # to create release (changesets/action)
18+ pull-requests : write # to create pull request (changesets/action)
19+ id-token : write # to publish to JSR
20+ timeout-minutes : 5
21+ runs-on : ubuntu-latest
22+ steps :
23+
24+ - name : Checkout repository
25+ uses : actions/checkout@v4
26+ with :
27+ fetch-depth : 0
28+
29+ - name : Install Deno
30+ uses : denoland/setup-deno@v2
31+ with :
32+ deno-version : v2.x
33+
34+ - name : Run Tests
35+ run : " deno task test"
36+
37+ - name : Dry-run JSR publish
38+ run : " deno publish --dry-run"
39+
40+ - name : Create release PR
41+ uses : changesets/action@v1
42+ with :
43+ version : deno task changesets:version
44+ commit : " chore(release): changesets versioning & publication"
45+ title : " Changesets: Versioning & Publication"
46+ createGithubReleases : true
47+ env :
48+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
49+
50+ - name : Publish to JSR
51+ if : steps.changesets.outputs.hasChangesets == 'false'
52+ run : " deno publish"
Original file line number Diff line number Diff line change 22
33Utility for setting up git hooks. A Deno port of [ husky]
44
5+ [ ![ JSR] [ jsr.badge.package ]] [ jsr.package ] [ ![ JSR] [ jsr.badge.score ]] [ jsr.package ]
6+
57> [ !IMPORTANT]
68> Work in progress
79
@@ -12,3 +14,7 @@ This project is greatly inspired by [husky]; credits go to [@typicode](https://g
1214[ Yakiyo/deno_hooks] ( https://github.com/Yakiyo/deno_hooks ) is a similar project. Please show them some love too.
1315
1416[ husky ] : https://github.com/typicode/husky
17+
18+ [ jsr.badge.package ] : https://jsr.io/badges/@vnphanquang/githooks
19+ [ jsr.badge.score ] : https://jsr.io/badges/@vnphanquang/githooks/score
20+ [ jsr.package ] : https://jsr.io/@vnphanquang/githooks
Original file line number Diff line number Diff line change 11{
22 "name" : " @vnphanquang/githooks" ,
3- "version" : " 1.0.0-next.0 " ,
3+ "version" : " 1.0.0" ,
44 "exports" : {
55 "." : " ./src/mod.ts" ,
6- ".bin" : " ./src/bin.ts" ,
6+ "./ bin" : " ./src/bin.ts" ,
77 "./errors" : " ./src/errors.ts" ,
88 "./constants" : " ./src/constants.ts"
99 },
1616 ]
1717 },
1818 "tasks" : {
19- "init" : " deno run --allow-read --allow-write=\" .githooks\" --allow-run=\" git\" bin.ts init" ,
19+ "init" : " deno run --allow-read --allow-write=\" .githooks\" --allow-run=\" git\" src/ bin.ts init" ,
2020 "test" : " deno test --allow-read --allow-write --allow-run --allow-net --clean --coverage" ,
21- "coverage" : " deno coverage --html"
21+ "coverage" : " deno coverage --html" ,
22+ "changesets" : " deno run -A npm:@changesets/cli" ,
23+ "changesets:version" : " deno run -A npm:@changesets/cli version"
2224 },
2325 "fmt" : {
2426 "useTabs" : true ,
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " @vnphanquang/githooks" ,
3+ "version" : " 0.0.0"
4+ }
You can’t perform that action at this time.
0 commit comments