Skip to content

Commit

Permalink
Merge pull request #805 from cygaar/update_release_trigger
Browse files Browse the repository at this point in the history
fix: update npm publication workflow
  • Loading branch information
ponderingdemocritus authored Dec 3, 2024
2 parents 4597261 + 1fb704a commit a0992ff
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,19 @@ jobs:
- name: Build packages
run: pnpm run build

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

- name: Get Version Tag
id: get_tag
Expand Down

0 comments on commit a0992ff

Please sign in to comment.