Follow me, and consider starring the project to show your :heart: and support.
This action allow your project to create a new release, based on semantic versionig principles, and publish it to your npm registry.
To generate a new version (git tag and npm package publishing), you have just to add to the commit message one of the following key:
git commit -m "add best feature ever [major]"
git commit -m "fix best feature ever [patch]"
git commit -m "update best feature ever"
An new release is only exeuted on the defined target-branch (see Action Usage)
See action.yml
Name | Type | Default | Description |
---|---|---|---|
target-branch | string | master | Branch name new release should be executed |
provenance | string | false | NPM package provenance |
:heavy_exclamation_mark: When the Action Parameter provenance is set to true the id-token permission must be set to write:
permissions:
id-token: write
on:
push:
branches: master #the branch name must be the same of **target-branch**
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write #allow to push on git repo
id-token: write #allow to publish npm package
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4 #checkout git repo
uses: actions/setup-node@v4 #setup node env
with:
node-version: 20.x
registry-url: 'https://registry.npmjs.org'
- name: Run my Action
id: run-action
uses: iuccio/npm-semver-publish-action@v1.0.0 #execute npm semver publish
with:
target-branch: master
provenance: true
env:
NODE_AUTH_TOKEN: $ #npm token
This action requires the NPM_TOKEN secret configuretion:
Add permissions to to push on git and publish on npm
permissions:
contents: write
id-token: write
Add to the checkout action:
uses: actions/checkout@v4
Add an actions/setup-node step to your workflow. If you have one already, ensure that the registry-url input is set (e.g. to https://registry.npmjs.org) so that this action can populate your .npmrc with authentication info:
uses: actions/setup-node@v4
with:
node-version: 20.x
registry-url: 'https://registry.npmjs.org'
add actions/npm-semver-publish step:
name: Run my Action
id: run-action
uses: iuccio/npm-semver-publish-action@v1.0.0
with:
target-branch: 'master' #where a new release is applied
provenance: true #if you want to publish on npm registry the provenance
env:
NODE_AUTH_TOKEN: $
That’s it!
See Development for more information.
CSVtoJSON is licensed under the GNU General Public License v3.0 License.
Just if you want to support this repository: