fix(cli): updated the --version command #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | ||
run-name: 'Release a [${{ github.event.inputs.versionType }}] version of better-tmux' | ||
'on': | ||
workflow_dispatch: | ||
inputs: | ||
versionType: | ||
description: Version type | ||
required: true | ||
default: patch | ||
type: choice | ||
options: | ||
- patch | ||
- minor | ||
- major | ||
jobs: | ||
setup: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: oven-sh/setup-bun@v2 | ||
- uses: pnpm/action-setup@v4 | ||
name: Install pnpm | ||
with: | ||
version: 9.0.0 | ||
run_install: false | ||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: 'pnpm' | ||
- name: Configure CI user | ||
run: | | ||
git config --global user.email "vmarcosp.pereira@gmail.com" | ||
git config --global user.name "vmarcosp" | ||
- name: Install dependencies | ||
run: pnpm install | ||
- name: Build Project | ||
run: pnpm turbo build | ||
- name: Generate CLI executable | ||
run: | ||
bash ./scripts/bump-cli-version.sh ${{ github.event.inputs.versionType }} | ||
bash ./scripts/build-cli.sh | ||
- name: Release | ||
run: pnpm release-it --ci --increment=${{ github.event.inputs.versionType }} --config=packages/lib/.release-it.json | ||
env: | ||
GITHUB_TOKEN: ${{secrets.GH_TOKEN }} | ||
- name: Publish npm package | ||
run: | | ||
cd packages/lib | ||
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}" > ~/.npmrc | ||
npm publish --access=public |