Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ on:
push:
tags:
- 'v*'
workflow_dispatch:
inputs:
tag:
description: 'Tag to release (e.g. v0.2.0). Must already exist.'
required: true
type: string

permissions:
contents: write
Expand All @@ -18,7 +24,7 @@ jobs:
build:
name: Build ${{ matrix.platform }}
runs-on: ${{ matrix.runner }}
if: startsWith(github.ref, 'refs/tags/')
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'
strategy:
fail-fast: false
matrix:
Expand All @@ -37,6 +43,8 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v5.0.1
with:
ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag || github.ref }}

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
Expand Down Expand Up @@ -67,7 +75,7 @@ jobs:
docs:
name: Build documentation
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'
defaults:
run:
shell: bash
Expand All @@ -77,6 +85,7 @@ jobs:
uses: actions/checkout@v5.0.1
with:
fetch-depth: 0
ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag || github.ref }}

- name: Set up Python
uses: actions/setup-python@v5
Expand All @@ -101,7 +110,7 @@ jobs:
name: Create Release
runs-on: ubuntu-latest
needs: build
if: startsWith(github.ref, 'refs/tags/')
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'

env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
Expand All @@ -116,7 +125,7 @@ jobs:
- name: Create Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
tag_name: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag || github.ref_name }}
files: tsi-*
generate_release_notes: true
env:
Expand All @@ -129,7 +138,7 @@ jobs:
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: docs
if: startsWith(github.ref, 'refs/tags/')
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'
steps:
- name: Deploy to GitHub Pages
id: deployment
Expand Down