Skip to content

Publish

Publish #3

Workflow file for this run

env: {}
# FILE GENERATED WITH: npx ghat fregante/ghatemplates/npm-publish
# SOURCE: https://github.com/fregante/ghatemplates
# Collaborators can publish a new version of what's on master via "workflow_dispatch"
# https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/
name: Publish
on:
workflow_dispatch:
inputs:
Version:
description: 'Version accepted by `npm version *`'
required: true
jobs:
NPM:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 20
- uses: actions/setup-node@v3
with:
node-version: 14.x
registry-url: 'https://registry.npmjs.org'
- run: npm ci || npm install
- uses: fregante/setup-git-user@v1
- run: npm version ${{ github.event.inputs.Version }}
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: git push --follow-tags
- uses: fregante/release-with-changelog@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
exclude: true