Skip to content

Publish

Publish #2

Workflow file for this run

name: Publish
on:
workflow_run:
workflows: ["Run Tests"]
branches: [main]
types:
- completed
jobs:
build:
runs-on: ubuntu-latest
if: "startsWith(github.event.head_commit.message, 'release:')"
environment: CI
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build
- run: npm test
- name: Publish 'case-converter-cli' package to npm
uses: actions/setup-node@v3
with:
registry-url: "https://registry.npmjs.org"
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm publish