-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds jobs for publishing npm packages
- Loading branch information
Showing
3 changed files
with
55 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: 'Publishes package to npm registry' | ||
|
||
inputs: | ||
project-name: | ||
description: 'Name of gradle project to test' | ||
required: true | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup antlr4 | ||
uses: ./.github/actions/setup-antlr4 | ||
|
||
- name: Install dependencies with frozen lock file and generate parser | ||
run: npm ci | ||
|
||
- name: Build project | ||
run: npm run build | ||
|
||
- name: Publish on updated version number | ||
uses: JS-DevTools/npm-publish@v2 | ||
with: | ||
token: ${{ secrets.NPM_TOKEN }} | ||
package: 'packages/${{inputs.project-name}}/package.json' | ||
access: 'public' |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Publish react-codemirror package to npm | ||
|
||
on: | ||
# Runs on pushes targeting the default branch | ||
# push: | ||
# branches: ['main'] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
env: | ||
NODE_OPTIONS: '--max_old_space_size=4096' | ||
|
||
jobs: | ||
publish: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
project: ['language-support', 'language-server', 'react-codemirror'] | ||
|
||
environment: publish-npm | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Publish ${{ matrix.project }} to npm | ||
uses: ./.github/actions/publish-npm | ||
with: | ||
project-name: ${{ matrix.project }} |