Skip to content

Create New Version

Create New Version #16

Workflow file for this run

name: Create New Version
on:
workflow_dispatch:
inputs:
release-type:
type: choice
description: 'Release type (one of): patch, minor, major,prepatch, preminor, premajor'
required: true
default: 'patch'
options:
- patch
- minor
- major
- prepatch
- preminor
- premajor
jobs:
release:
name: Create New Version
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: 🔍 GH_TOKEN
if: env.GH_TOKEN == ''
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: echo "GH_TOKEN=${GITHUB_TOKEN}" >> $GITHUB_ENV
- name: 📦 Checkout project repo
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GH_TOKEN }}
- name: 📝 Git User Setup
run: |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
- name: 📦 Setup Node + PNPM + install deps
uses: ./.github/actions/setup-node-pnpm-install
- name: 🏃‍♂️ Create tag
run: |
pnpm run np ${{ github.event.inputs.release-type }} --no-publish
- name: 📦 Publish to npm
uses: JS-DevTools/npm-publish@v2
with:
token: ${{ secrets.NPMJS_ACCESS_TOKEN }}