This action does a few things:
- Uses conventional-recommended-bump to identify required
patch
,minor
ormajor
version change - Runs
npm version
with the output of the above - Performs an
npm publish
to the already setup repository (setup-node
)
Optional The email address used when committing the new version back to your repository. Default "conventional-changelog-npm-publish@noreply.github.com"
.
Optional The name used when committing the new version details back to your repository. Default "conventional-changelog-npm-publish"
.
Optional The message used when committing the new version details back to your repository. Default "Bumping [VERSION_TYPE] version"
.
Replaces [VERSION_TYPE]
with one of patch
, minor
or major
. So the default becomes Bumping patch version
name: npm-build-publish
on:
push:
branches:
- master
jobs:
npm-build-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@master
# required - sets up auth in the node env
- name: Set up Node.js
uses: actions/setup-node@master
with:
node-version: 12.x
registry-url: 'https://npm.pkg.github.com'
# optional
- run: npm install
# optional
- run: npm run build
env:
CI: true
# required
- name: version & publish
uses: geeman201/conventional-changelog-npm-publish/@v14
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- Push release also to github releases tab (should be a simple api call)
-
conventional-recommended-bump
supports different commit message models (but I couldn't get thepreset
to work) - This library uses
exec
for most of its work making it near impossible to test - everything else sits within external libraries.