Skip to content

Commit 5939e0c

Browse files
committed
fix: allow manual release with tag input
1 parent 331dc9e commit 5939e0c

2 files changed

Lines changed: 20 additions & 4 deletions

File tree

.git-ai/lancedb.tar.gz

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:8d0234684b502bb60434b00dd6bb7df0a6dcde688456f48ee7a8cdcc07d496a9
3-
size 13006
2+
oid sha256:c37608ea141b8ebed20cc0a0b87ac05c8e59f1622be462ef814c1367dfe5f2a0
3+
size 13021

.github/workflows/release.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@ on:
44
push:
55
tags:
66
- "v*"
7-
workflow_dispatch: {}
7+
workflow_dispatch:
8+
inputs:
9+
tag:
10+
description: "Tag name to release (e.g. v1.2.3). If empty, skip release/publish steps."
11+
required: false
12+
type: string
813

914
permissions:
1015
contents: write
@@ -13,9 +18,17 @@ permissions:
1318
jobs:
1419
build-and-publish:
1520
runs-on: ubuntu-latest
21+
env:
22+
RELEASE_TAG: ${{ github.ref_type == 'tag' && github.ref_name || inputs.tag }}
1623
steps:
1724
- name: Checkout
1825
uses: actions/checkout@v4
26+
with:
27+
fetch-depth: 0
28+
29+
- name: Checkout input tag
30+
if: ${{ inputs.tag != '' && github.ref_type != 'tag' }}
31+
run: git checkout "${{ inputs.tag }}"
1932

2033
- name: Setup Node
2134
uses: actions/setup-node@v4
@@ -43,11 +56,14 @@ jobs:
4356
path: ${{ steps.pack.outputs.tarball }}
4457

4558
- name: Create GitHub Release (attach tarball)
59+
if: ${{ env.RELEASE_TAG != '' }}
4660
uses: softprops/action-gh-release@v2
4761
with:
62+
tag_name: ${{ env.RELEASE_TAG }}
4863
files: ${{ steps.pack.outputs.tarball }}
4964

5065
- name: Publish to GitHub Packages (npm.pkg.github.com)
66+
if: ${{ env.RELEASE_TAG != '' }}
5167
run: |
5268
npm config set registry https://npm.pkg.github.com
5369
npm pkg set name="@${{ github.repository_owner }}/git-ai"
@@ -58,7 +74,7 @@ jobs:
5874
- name: Publish to npmjs.org (optional)
5975
env:
6076
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
61-
if: ${{ env.NODE_AUTH_TOKEN != '' }}
77+
if: ${{ env.RELEASE_TAG != '' && env.NODE_AUTH_TOKEN != '' }}
6278
run: |
6379
npm config set registry https://registry.npmjs.org
6480
npm publish --access public

0 commit comments

Comments
 (0)