Skip to content

Merge pull request #189 from jeswanke/ACM-20347-difficult-to-edit-yaml2 #183

Merge pull request #189 from jeswanke/ACM-20347-difficult-to-edit-yaml2

Merge pull request #189 from jeswanke/ACM-20347-difficult-to-edit-yaml2 #183

Workflow file for this run

name: NPM Publish
on:
push:
branches:
- main
paths:
- src/**
workflow_dispatch:
inputs:
versionIncrement:
description: Version Increment
required: true
default: minor
type: choice
options:
- major
- minor
- patch
jobs:
npm-publish:
runs-on: ubuntu-latest
concurrency: repository
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GH_TOKEN }}
- uses: actions/setup-node@v4
with:
node-version: '18'
registry-url: https://registry.npmjs.org/
cache: 'npm'
- name: npm version ${{ inputs.versionIncrement || 'minor' }}
run: |
TAG=$(npm version ${{ inputs.versionIncrement || 'minor' }} --no-git-tag-version)
echo "TAG=$(echo $TAG)" >> $GITHUB_ENV
- run: npm ci
- run: npm run build
- uses: EndBug/add-and-commit@v9
with:
default_author: github_actions
message: Release ${{ env.TAG }} [skip ci]
tag: ${{ env.TAG }}
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm run pages
- uses: JamesIves/github-pages-deploy-action@4.1.5
with:
branch: gh-pages
folder: dist
single-commit: true