40 lines
1.1 KiB
YAML
40 lines
1.1 KiB
YAML
# 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:
|
|
release:
|
|
types: [created]
|
|
|
|
jobs:
|
|
build:
|
|
name: Test
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: borales/actions-yarn@v2.3.0
|
|
with:
|
|
cmd: install # will run `yarn install` command
|
|
- uses: borales/actions-yarn@v2.3.0
|
|
with:
|
|
cmd: test # will run `yarn test` command
|
|
|
|
publish-npm:
|
|
needs: Publish
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: borales/actions-yarn@v2.3.0
|
|
with:
|
|
cmd: install # will run `yarn install` command
|
|
- uses: borales/actions-yarn@v2.3.0
|
|
with:
|
|
cmd: test # will run `yarn test` command
|
|
- uses: borales/actions-yarn@v2.3.0
|
|
with:
|
|
auth-token: ${{ secrets.npm_token }}
|
|
registry-url: registry.npmjs.org
|
|
cmd: publish # will run `yarn publish` command
|
|
|