Skip to content

support private package deployment #22

support private package deployment

support private package deployment #22

Workflow file for this run

name: Build, Test and maybe Publish
on:
push:
branches:
- main
pull_request:
jobs:
test:
name: Build & Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: npm
cache-dependency-path: src/package-lock.json
- name: Build
run: cd src && npm install
- name: Test
run: cd src && npm test
publish:
name: Publish
needs: test
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: npm
cache-dependency-path: src/package-lock.json
- name: Build
run: cd src && npm install
- name: Test
run: cd src && npm test
- name: Publish
uses: github-actions-community/merge-release@main
env:
DEPLOY_DIR: src
SRC_PACKAGE_DIR: src
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}