Skip to content

Release

Release #118

Workflow file for this run

name: Release
on:
workflow_dispatch:
inputs:
version_type:
description: "Version bump type (major, minor, patch, prerelease)"
required: true
default: "patch"
type: choice
options:
- patch
- minor
- major
- prerelease
jobs:
release:
runs-on: ubuntu-latest
# Only run this workflow on main branch
if: github.ref == 'refs/heads/main'
permissions:
contents: write
packages: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Deno
uses: denoland/setup-deno@v2
with:
deno-version-file: .tool-versions
- name: Check formatting
run: deno fmt --check
- name: Run linter
run: deno lint
- name: Type check
run: deno check --config deno.json ./src/index.ts
- name: Run tests
run: deno test --allow-all
- name: Configure Git
run: |
git config user.name "GitHub Actions"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
deno run --allow-all src/scripts/release.ts ${{ inputs.version_type }}