Skip to content

Commit

Permalink
Add npm workspaces CI
Browse files Browse the repository at this point in the history
  • Loading branch information
olivier-lando committed May 5, 2022
1 parent 7742983 commit 30cc67a
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 6 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/create-release-from-changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Create draft release if needed
on:
push:
branches:
- main
jobs:
create-draft-release-if-needed:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Create draft releases if needed
uses: apivideo/[email protected]
with:
github-auth-token: ${{ secrets.GITHUB_TOKEN }}
package-name-suffix-to-ignore: "@"

18 changes: 12 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
name: Release packages
name: Release package to npmjs
on:
release:
types: [published]
jobs:
deploy:
publish-npm-package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
registry-url: 'https://registry.npmjs.org'
- run: yarn
- name: Publish to npm
run: npm publish --workspace=packages/ui/react
- name: Retrieve the NPM workspace path
id: get-workspace-path
uses: apivideo/[email protected]
with:
github-auth-token: ${{ secrets.GITHUB_TOKEN }}
package-name-suffix-to-ignore: "@"
- run: yarn
- name: Publish workspace to NPM
run: npm publish --worspace ${{ steps.get-workspace-path.outputs.packagePath }} --access=public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 30cc67a

Please sign in to comment.