Skip to content

Release

Release #42

Workflow file for this run

name: Release
on:
workflow_dispatch:
inputs:
releaseType:
description: "Release type - major, minor or patch"
required: true
default: "patch"
preReleaseFlavor:
description: "Pre-Release flavor - rc, beta, or anything"
required: false
default: ""
env:
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "npm"
- name: Setup Git
run: |
git config --global user.name "devx-sauce-bot"
git config --global user.email "[email protected]"
- name: Install Dependencies
run: npm ci
- name: Build
run: npm run build
- name: Login to NPM
run: npm set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}
- name: Pre-Release
if: ${{ github.event.inputs.preReleaseFlavor != '' }}
run: npm run release:ci -- ${{ github.event.inputs.releaseType }} --preRelease=${{ github.event.inputs.preReleaseFlavor }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Release
if: ${{ github.event.inputs.preReleaseFlavor == '' }}
run: npm run release:ci -- ${{ github.event.inputs.releaseType }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}