Skip to content

Commit def6ebe

Browse files
feat: update npm publish workflow to use github release version (#37)
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Han Xiao <[email protected]>
1 parent df99251 commit def6ebe

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

.github/workflows/npm-publish.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,24 @@ jobs:
2020
- name: Install dependencies
2121
run: npm ci
2222

23-
- name: Run lint and tests
23+
- name: Run lint
2424
env:
2525
BRAVE_API_KEY: ${{ secrets.BRAVE_API_KEY }}
2626
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
2727
JINA_API_KEY: ${{ secrets.JINA_API_KEY }}
2828
GOOGLE_API_KEY: ${{ secrets.GEMINI_API_KEY }}
2929
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
30-
run: |
31-
npm run lint
32-
npm test
30+
run: npm run lint
3331

3432
- name: Build TypeScript
3533
run: npm run build
34+
35+
- name: Update version from release
36+
run: |
37+
# Get release tag without 'v' prefix
38+
VERSION=$(echo ${{ github.ref_name }} | sed 's/^v//')
39+
# Update version in package.json
40+
npm version $VERSION --no-git-tag-version --allow-same-version
3641
3742
- name: Publish to npm
3843
env:

0 commit comments

Comments
 (0)