Skip to content

Commit a0992ff

Browse files
Merge pull request #805 from cygaar/update_release_trigger
fix: update npm publication workflow
2 parents 4597261 + 1fb704a commit a0992ff

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

.github/workflows/release.yaml

+12-4
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,19 @@ jobs:
4343
- name: Build packages
4444
run: pnpm run build
4545

46-
- name: Tag and Publish Packages
47-
id: tag_publish
46+
- name: Publish Packages
47+
id: publish
4848
run: |
49-
npx lerna version ${{ github.event.inputs.release_type }} --conventional-commits --yes --no-private --force-publish
50-
npx lerna publish from-git --yes --dist-tag ${{ github.event.inputs.release_type == 'preminor' && 'next' || 'latest' }}
49+
# Get the latest release tag
50+
LATEST_TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
51+
echo "Publishing version: $LATEST_TAG"
52+
53+
# Checkout the latest tag
54+
git checkout $LATEST_TAG
55+
56+
npx lerna publish from-git --yes --dist-tag latest
57+
env:
58+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
5159

5260
- name: Get Version Tag
5361
id: get_tag

0 commit comments

Comments
 (0)