Skip to content

Trigger Release

Trigger Release #30

on:
workflow_dispatch:
inputs:
releaseType:
description: Release stable or beta?
required: true
type: choice
options:
- beta
- stable
semverType:
description: semver type?
type: choice
options:
- patch
- minor
- major
secrets:
RELEASE_BOT_GITHUB_TOKEN:
required: true
name: Trigger Release
env:
PNPM_VERSION: 8.4.0
SEMVER_TYPE: ${{ github.event.inputs.semverType }}
RELEASE_TYPE: ${{ github.event.inputs.releaseType }}
jobs:
start:
runs-on: ubuntu-latest
environment: release-${{ github.event.inputs.releaseType }}-${{ github.event.inputs.semverType }}
steps:
- name: Setup node
uses: actions/setup-node@v3
if: ${{ steps.docs-change.outputs.docsChange == 'nope' }}
with:
node-version: 18
check-latest: true
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 10
token: ${{ secrets.RELEASE_BOT_GITHUB_TOKEN }}
- run: npm i -g pnpm@${PNPM_VERSION}
- id: get-store-path
run: echo STORE_PATH=$(pnpm store path) >> $GITHUB_OUTPUT
- uses: actions/cache@v3
timeout-minutes: 5
id: cache-pnpm-store
with:
path: ${{ steps.get-store-path.outputs.STORE_PATH }}
key: pnpm-store-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
pnpm-store-
pnpm-store-${{ hashFiles('pnpm-lock.yaml') }}
- run: pnpm install
- run: |
pnpm clean
pnpm build
pnpm run-all-checks
pnpm test:build
- name: Configure git
run: |
git config user.name "vercel-release-bot"
git config user.email "[email protected]"
- name: Bump version and tag
run: |
node ./scripts/bump-next-version.js
- name: Git push
env:
RELEASE_BOT_GITHUB_TOKEN: ${{ secrets.RELEASE_BOT_GITHUB_TOKEN }}
run: |
git push origin main
git push origin --tags