Initial implementation #1
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
name: Deployment Pipeline | |
on: | |
workflow_dispatch: | |
push: | |
branches: ["main"] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- name: Setup Node.js environment | |
uses: actions/[email protected] | |
with: | |
node-version-file: .nvmrc | |
- name: Install dependencies | |
run: npm ci | |
- name: Run service tests | |
run: npm -w src/service test | |
- name: Run plugin tests | |
run: npm -w src/plugin test --watch=false --coverage | |
publish-service: | |
runs-on: ubuntu-latest | |
needs: test | |
if: startsWith(github.ref, 'refs/tags/v') | |
steps: | |
- uses: actions/[email protected] | |
- name: Setup Node.js environment | |
uses: actions/[email protected] | |
with: | |
node-version-file: .nvmrc | |
registry-url: "https://registry.npmjs.org" | |
- name: Install dependencies | |
run: npm ci | |
- name: Publish package | |
run: npm -w src/service publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |