Skip to content

Commit 461ebe6

Browse files
smurchingclaude
andcommitted
Drop tag-triggered path from npm release workflows
Releases now go exclusively through workflow_dispatch with the production flag. Removes the push:tags trigger and the version/tag verification step. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 5fb8890 commit 461ebe6

2 files changed

Lines changed: 14 additions & 62 deletions

File tree

.github/workflows/release-ai-sdk-provider.yml

Lines changed: 7 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
name: Release @databricks/ai-sdk-provider
22

33
on:
4-
push:
5-
tags:
6-
- "ai-sdk-provider-v*"
74
workflow_dispatch:
85
inputs:
96
production:
@@ -20,7 +17,7 @@ jobs:
2017
id-token: write
2118
contents: write
2219
environment:
23-
name: ${{ (github.event_name == 'push' || inputs.production) && 'npm' || 'npm-next' }}
20+
name: ${{ inputs.production && 'npm' || 'npm-next' }}
2421
url: https://www.npmjs.com/package/@databricks/ai-sdk-provider
2522
defaults:
2623
run:
@@ -45,27 +42,6 @@ jobs:
4542
PKG_VERSION=$(node -p "require('./package.json').version")
4643
echo "version=$PKG_VERSION" >> $GITHUB_OUTPUT
4744
48-
- name: Verify version matches tag
49-
if: github.event_name == 'push'
50-
run: |
51-
PKG_VERSION=${{ steps.get-version.outputs.version }}
52-
TAG_NAME="ai-sdk-provider-v$PKG_VERSION"
53-
54-
CURRENT_COMMIT=$(git rev-parse HEAD)
55-
TAG_COMMIT=$(git ls-remote --tags origin "refs/tags/$TAG_NAME" | cut -f1)
56-
57-
if [ -z "$TAG_COMMIT" ]; then
58-
echo "Tag $TAG_NAME does not exist on GitHub"
59-
exit 1
60-
fi
61-
62-
if [ "$CURRENT_COMMIT" != "$TAG_COMMIT" ]; then
63-
echo "Tag $TAG_NAME exists but points to commit $TAG_COMMIT, not current commit $CURRENT_COMMIT"
64-
exit 1
65-
fi
66-
67-
echo "Verified: Tag $TAG_NAME exists and points to current commit $CURRENT_COMMIT"
68-
6945
- name: Clean
7046
run: npm run clean
7147

@@ -91,26 +67,26 @@ jobs:
9167
path: integrations/ai-sdk-provider/*.tgz
9268

9369
- name: Create GitHub Release (draft)
94-
if: github.event_name == 'push' || inputs.production
70+
if: inputs.production
9571
uses: ncipollo/release-action@v1
9672
with:
9773
artifacts: "integrations/ai-sdk-provider/*.tgz"
9874
draft: true
9975
generateReleaseNotes: true
10076

10177
- name: Publish to npm
102-
if: github.event_name == 'push' || inputs.production
78+
if: inputs.production
10379
run: npm publish --access public --provenance --ignore-scripts
10480

10581
- name: Publish to npm (next tag)
106-
if: github.event_name != 'push' && !inputs.production
82+
if: !inputs.production
10783
run: npm publish --access public --tag next --provenance --ignore-scripts
10884

10985
- name: Wait for registry propagation
11086
run: sleep 15
11187

11288
- name: Smoke test (production)
113-
if: github.event_name == 'push' || inputs.production
89+
if: inputs.production
11490
run: |
11591
PKG_VERSION=${{ steps.get-version.outputs.version }}
11692
mkdir -p /tmp/smoke-test
@@ -126,7 +102,7 @@ jobs:
126102
echo "Smoke test passed!"
127103
128104
- name: Smoke test (next tag)
129-
if: github.event_name != 'push' && !inputs.production
105+
if: !inputs.production
130106
run: |
131107
mkdir -p /tmp/smoke-test
132108
cd /tmp/smoke-test
@@ -138,7 +114,7 @@ jobs:
138114
- name: Generate package link
139115
run: |
140116
PKG_VERSION=${{ steps.get-version.outputs.version }}
141-
if [ "${{ github.event_name == 'push' || inputs.production }}" == "true" ]; then
117+
if [ "${{ inputs.production }}" == "true" ]; then
142118
LINK="https://www.npmjs.com/package/@databricks/ai-sdk-provider/v/$PKG_VERSION"
143119
echo "## :rocket: Package Released" >> $GITHUB_STEP_SUMMARY
144120
echo "" >> $GITHUB_STEP_SUMMARY

.github/workflows/release-langchainjs.yml

Lines changed: 7 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
name: Release @databricks/langchainjs
22

33
on:
4-
push:
5-
tags:
6-
- "langchainjs-v*"
74
workflow_dispatch:
85
inputs:
96
production:
@@ -20,7 +17,7 @@ jobs:
2017
id-token: write
2118
contents: write
2219
environment:
23-
name: ${{ (github.event_name == 'push' || inputs.production) && 'npm' || 'npm-next' }}
20+
name: ${{ inputs.production && 'npm' || 'npm-next' }}
2421
url: https://www.npmjs.com/package/@databricks/langchainjs
2522
defaults:
2623
run:
@@ -45,27 +42,6 @@ jobs:
4542
PKG_VERSION=$(node -p "require('./package.json').version")
4643
echo "version=$PKG_VERSION" >> $GITHUB_OUTPUT
4744
48-
- name: Verify version matches tag
49-
if: github.event_name == 'push'
50-
run: |
51-
PKG_VERSION=${{ steps.get-version.outputs.version }}
52-
TAG_NAME="langchainjs-v$PKG_VERSION"
53-
54-
CURRENT_COMMIT=$(git rev-parse HEAD)
55-
TAG_COMMIT=$(git ls-remote --tags origin "refs/tags/$TAG_NAME" | cut -f1)
56-
57-
if [ -z "$TAG_COMMIT" ]; then
58-
echo "Tag $TAG_NAME does not exist on GitHub"
59-
exit 1
60-
fi
61-
62-
if [ "$CURRENT_COMMIT" != "$TAG_COMMIT" ]; then
63-
echo "Tag $TAG_NAME exists but points to commit $TAG_COMMIT, not current commit $CURRENT_COMMIT"
64-
exit 1
65-
fi
66-
67-
echo "Verified: Tag $TAG_NAME exists and points to current commit $CURRENT_COMMIT"
68-
6945
- name: Clean
7046
run: rm -rf dist
7147

@@ -94,26 +70,26 @@ jobs:
9470
path: integrations/langchainjs/*.tgz
9571

9672
- name: Create GitHub Release (draft)
97-
if: github.event_name == 'push' || inputs.production
73+
if: inputs.production
9874
uses: ncipollo/release-action@v1
9975
with:
10076
artifacts: "integrations/langchainjs/*.tgz"
10177
draft: true
10278
generateReleaseNotes: true
10379

10480
- name: Publish to npm
105-
if: github.event_name == 'push' || inputs.production
81+
if: inputs.production
10682
run: npm publish --access public --provenance --ignore-scripts
10783

10884
- name: Publish to npm (next tag)
109-
if: github.event_name != 'push' && !inputs.production
85+
if: !inputs.production
11086
run: npm publish --access public --tag next --provenance --ignore-scripts
11187

11288
- name: Wait for registry propagation
11389
run: sleep 15
11490

11591
- name: Smoke test (production)
116-
if: github.event_name == 'push' || inputs.production
92+
if: inputs.production
11793
run: |
11894
PKG_VERSION=${{ steps.get-version.outputs.version }}
11995
mkdir -p /tmp/smoke-test
@@ -129,7 +105,7 @@ jobs:
129105
echo "Smoke test passed!"
130106
131107
- name: Smoke test (next tag)
132-
if: github.event_name != 'push' && !inputs.production
108+
if: !inputs.production
133109
run: |
134110
mkdir -p /tmp/smoke-test
135111
cd /tmp/smoke-test
@@ -141,7 +117,7 @@ jobs:
141117
- name: Generate package link
142118
run: |
143119
PKG_VERSION=${{ steps.get-version.outputs.version }}
144-
if [ "${{ github.event_name == 'push' || inputs.production }}" == "true" ]; then
120+
if [ "${{ inputs.production }}" == "true" ]; then
145121
LINK="https://www.npmjs.com/package/@databricks/langchainjs/v/$PKG_VERSION"
146122
echo "## :rocket: Package Released" >> $GITHUB_STEP_SUMMARY
147123
echo "" >> $GITHUB_STEP_SUMMARY

0 commit comments

Comments
 (0)