forked from embiem/react-canvas-draw
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
20 additions
and
33 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 |
---|---|---|
@@ -1,43 +1,33 @@ | ||
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages | ||
|
||
name: Node.js Package | ||
|
||
on: | ||
push: | ||
# Sequence of patterns matched against refs/heads | ||
branches: | ||
# Push events on main branch | ||
- master | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
build-and-deploy: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout 🛎️ | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install and Build 🔧 | ||
run: | | ||
npm install | ||
npm run build | ||
- name: Deploy 🚀 | ||
uses: JamesIves/[email protected] | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
branch: gh-pages # The branch the action should deploy to. | ||
folder: demo/dist # The folder the action should deploy. | ||
|
||
publish-npm: | ||
node-version: 16 | ||
- run: npm ci | ||
- run: npm test | ||
|
||
publish-gpr: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
permissions: | ||
packages: write | ||
contents: read | ||
steps: | ||
- uses: actions/checkout@v2 | ||
# Setup .npmrc file to publish to npm | ||
- uses: actions/setup-node@v2 | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: "12.x" | ||
registry-url: "https://registry.npmjs.org" | ||
- run: npm install | ||
node-version: 16 | ||
registry-url: https://npm.pkg.github.com/ | ||
- run: npm ci | ||
- run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} |
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