Skip to content

Commit 2492e7d

Browse files
committed
fix: add manual trigger option for release workflow and fix eslint pattern
1 parent af6926a commit 2492e7d

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ on:
44
push:
55
tags:
66
- 'v*'
7+
workflow_dispatch:
8+
inputs:
9+
version:
10+
description: 'Version to release (e.g., 0.3.0)'
11+
required: true
12+
type: string
713

814
env:
915
NODE_VERSION: '18.x'
@@ -22,10 +28,14 @@ jobs:
2228
with:
2329
fetch-depth: 0
2430

25-
- name: Get version from tag
31+
- name: Get version from tag or input
2632
id: get_version
2733
run: |
28-
VERSION=${GITHUB_REF#refs/tags/v}
34+
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
35+
VERSION="${{ github.event.inputs.version }}"
36+
else
37+
VERSION=${GITHUB_REF#refs/tags/v}
38+
fi
2939
echo "version=${VERSION}" >> $GITHUB_OUTPUT
3040
echo "Detected version: ${VERSION}"
3141
@@ -66,7 +76,7 @@ jobs:
6676
run: pnpm install --frozen-lockfile
6777

6878
- name: Run linting
69-
run: pnpm exec eslint . --ext .ts,.js
79+
run: pnpm exec eslint "**/*.{ts,js}" --ignore-path .gitignore
7080

7181
- name: Check formatting
7282
run: pnpm exec prettier --check .

0 commit comments

Comments
 (0)