Skip to content

Commit

Permalink
Adds job to publish
Browse files Browse the repository at this point in the history
  • Loading branch information
ncordon committed Oct 25, 2023
1 parent e5cb8e4 commit 5fcbdf3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
name: Run Tests
on:
push:
branches:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
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:
# Run the workflow on push only after the unit tests have passed
workflow_run:
workflows: ['Run Tests']
branches: []

env:
NODE_OPTIONS: '--max_old_space_size=4096'
Expand All @@ -32,9 +30,10 @@ jobs:
- name: Build project
run: npm run build

- name: Publish on updated version number
uses: JS-DevTools/npm-publish@v2
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
token: ${{ secrets.NPM_TOKEN }}
package: 'packages/react-codemirror/package.json'
access: 'restricted'
publish: npm run release
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"scripts": {
"prepare": "husky install",
"build": "turbo run build",
"release": "turbo run build && npx changeset publish",
"clean": "turbo run clean",
"watch": "turbo run watch",
"test": "turbo run test",
Expand Down

0 comments on commit 5fcbdf3

Please sign in to comment.