Skip to content

Release CLI

Release CLI #6

Workflow file for this run

name: Release CLI
permissions:
contents: write
packages: write
on:
workflow_dispatch:
inputs:
release_type:
description: "Release type: patch, minor, major"
required: true
default: patch
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "22"
- name: Install dependencies
run: npm install
- name: Build the cli
run: npm run build
- name: Generate binaries
run: npm run binaries
- name: Login with git
run: |
git config --global user.email "[email protected]"
git config --global user.name "Florian Bigot"
- name: Login to npm registry
run: npm set "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}"
- name: Run release-it
run: npm run release -- --ci --${{ github.event.inputs.release_type }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}