Skip to content

Manual NPM Publish

Manual NPM Publish #17

Workflow file for this run

name: Manual NPM Publish
on:
workflow_dispatch:
inputs:
releaseType:
description: 'Release type - major, minor or patch'
required: true
default: 'patch'
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Clone Repository
uses: actions/checkout@v2
- name: Setup Node version
uses: actions/setup-node@v1
with:
node-version: 18.20.4
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
build:
needs: test
runs-on: ubuntu-latest
steps:
- name: Clone Repository
uses: actions/checkout@v2
- name: Setup Node version
uses: actions/setup-node@v1
with:
node-version: 18.20.4
- name: Install dependencies
run: npm ci
- name: Build package
run: npm run build:package:ci
- name: Upload built package
uses: actions/upload-artifact@v2
with:
name: compiled-package
path: |
es6/
lib/
umd/
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Clone Repository
uses: actions/checkout@v2
- name: Setup Node version
uses: actions/setup-node@v1
with:
node-version: 18.20.4
registry-url: https://registry.npmjs.org/
- name: Setup Git
run: |
git config --global user.name "oss-sauce-bot"
git config --global user.email "[email protected]"
- name: Install dependencies
run: npm ci
- name: Download built package
uses: actions/download-artifact@v2
with:
name: compiled-package
- name: Release
run: npm run release:ci -- ${{github.event.inputs.releaseType}}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}