Skip to content

Commit

Permalink
feat: create reusable workflow
Browse files Browse the repository at this point in the history
part of #13
  • Loading branch information
HerringtonDarkholme committed Jan 12, 2025
1 parent 2e96a9e commit 0741049
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 8 deletions.
9 changes: 1 addition & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
# Recreated from
# https://github.com/tree-sitter/workflows/blob/0ddf14c2d6cb042a24f9b9bd9c2912f811aac862/.github/workflows/package-npm.yml

# This is a reusable and reference workflow for parsers
name: Build package

on:
# push:
# branches:
# - main
workflow_dispatch:
inputs:
package-name:
description: The name of the package
type: string
workflow_call:
inputs:
package-name:
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/trigger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Publish package

on:
# push:
# branches:
# - main
workflow_dispatch:
inputs:
package-name:
description: The name of the package
type: string
dry-run:
description: Whether to run the workflow without publishing
type: boolean
default: false

jobs:
npm-publish:
uses: ast-grep/lang/.github/workflows/release@main
with:
package-name: ${{inputs.package-name}}
secrets:
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}

0 comments on commit 0741049

Please sign in to comment.