Publish #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
env: {} | |
# DO NOT EDIT BELOW, USE: npx ghat fregante/ghatemplates/npm-publish | |
# 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@v2 | |
with: | |
fetch-depth: 20 | |
- uses: actions/setup-node@v1 | |
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: notlmn/release-with-changelog@v3 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
exclude: true |