Skip to content

Release & Publish to NPM #123

Release & Publish to NPM

Release & Publish to NPM #123

Workflow file for this run

name: "Release & Publish to NPM"
on:
push:
branches:
- master
workflow_run:
workflows: ["End-to-End Tests"]
types: [completed]
jobs:
release:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm run test:coverage
- uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./coverage
- name: Build
run: npm run build
- name: Initialize Git User
run: |
git config --global user.email "[email protected]"
git config --global user.name "Release Workflow"
- name: Initialize the NPM config
env:
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
run: npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN
- name: Release and Publish
run: npm run release --ci
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
#run: node ./node_modules/.bin/semantic-release