Skip to content

Create a release

Create a release #1

Workflow file for this run

name: Create a release
on:
workflow_dispatch:
inputs:
version:
type: choice
description: 'Version to bump'
required: true
options:
- 'patch'
- 'minor'
- 'major'
tag:
type: choice
description: 'Tag'
required: true
options:
- 'alpha'
- 'beta'
- 'latest'
jobs:
release:
name: Release new version
runs-on: ubuntu-latest
outputs:
new_tag: ${{ steps.bump_verson.outputs.tag }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm run build
- id: bump_verson
run: npm version ${{ inputs.version }} >> "$GITHUB_OUTPUT"
- run: git push --follow-tags
github_release:
name: Create a release
runs-on: ubuntu-latest
needs: release
steps:
- run: gh release create ${{ needs.release.outputs.new_tag }} --draft --verify-tag