Skip to content

Commit 0741049

Browse files
feat: create reusable workflow
part of #13
1 parent 2e96a9e commit 0741049

File tree

2 files changed

+24
-8
lines changed

2 files changed

+24
-8
lines changed

.github/workflows/release.yml

+1-8
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,10 @@
11
# Recreated from
22
# https://github.com/tree-sitter/workflows/blob/0ddf14c2d6cb042a24f9b9bd9c2912f811aac862/.github/workflows/package-npm.yml
33

4+
# This is a reusable and reference workflow for parsers
45
name: Build package
56

67
on:
7-
# push:
8-
# branches:
9-
# - main
10-
workflow_dispatch:
11-
inputs:
12-
package-name:
13-
description: The name of the package
14-
type: string
158
workflow_call:
169
inputs:
1710
package-name:

.github/workflows/trigger.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Publish package
2+
3+
on:
4+
# push:
5+
# branches:
6+
# - main
7+
workflow_dispatch:
8+
inputs:
9+
package-name:
10+
description: The name of the package
11+
type: string
12+
dry-run:
13+
description: Whether to run the workflow without publishing
14+
type: boolean
15+
default: false
16+
17+
jobs:
18+
npm-publish:
19+
uses: ast-grep/lang/.github/workflows/release@main
20+
with:
21+
package-name: ${{inputs.package-name}}
22+
secrets:
23+
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}

0 commit comments

Comments
 (0)