Skip to content

Release 3.4.0

Release 3.4.0 #6

Workflow file for this run

name: release
on:
workflow_dispatch:
inputs:
increment:
description: Release increment (patch, minor, major)
required: false
default: "patch"
type: choice
options:
- patch
- minor
- major
push:
tags:
- 'v*'
jobs:
publish:
name: release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Bun
uses: oven-sh/setup-bun@v2
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Build
run: bun run build
- name: Configure Git identity
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Run release-it
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ZED_EXTENSIONS_TOKEN: ${{ secrets.ZED_EXTENSIONS_TOKEN }}
run: |
if [ -n "${ZED_EXTENSIONS_TOKEN}" ]; then
export GITHUB_TOKEN="${ZED_EXTENSIONS_TOKEN}"
fi
if [ "${GITHUB_EVENT_NAME}" = "workflow_dispatch" ]; then
INCREMENT="${{ github.event.inputs.increment }}"
if [ -z "$INCREMENT" ]; then
INCREMENT="patch"
fi
bun run release:ci -- --increment="${INCREMENT}"
exit 0
fi
TAG_VERSION="${GITHUB_REF_NAME#v}"
if [ -z "$TAG_VERSION" ]; then
echo "Could not parse release version from tag: ${GITHUB_REF_NAME}"
exit 1
fi
bun run release:ci -- "${TAG_VERSION}"