Skip to content

Release

Release #1

Workflow file for this run

name: Release
run-name: "Release"
on:
workflow_dispatch:
inputs:
increment-type:
description: 'Version increment type'
required: true
default: 'patch'
type: 'choice'
options:
- patch
- minor
- major
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
concurrency:
group: release
cancel-in-progress: true
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.pat_github}}
ref: main
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- name: Update package
id: update_package
run: |
npm ci
git config --global user.email "yog27ray@example.com"
git config --global user.name "Yogendra Singh"
VERSION=$(npm version ${{ github.event.inputs.increment-type }})
npm run build
cd dist
npm publish
cd ..
git push
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}