Skip to content

Commit

Permalink
ci: fix canary release action
Browse files Browse the repository at this point in the history
  • Loading branch information
RetricSu committed Jul 11, 2024
1 parent 893ef61 commit 57a3239
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/canary-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,16 @@ jobs:
id: vars
run: echo "COMMIT_ID=$(git rev-parse --short HEAD)" >> $GITHUB_ENV

- name: Update version for canary release
run: pnpm -r --filter sdk version prerelease --preid "canary-${{ env.COMMIT_ID }}"

- name: Build
run: pnpm -r --filter sdk run build

- name: Publish to npm with commit short ID as version
- name: Publish to npm with canary tag
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
run: |
COMMIT_ID=${{ env.COMMIT_ID }}
pnpm -r --filter sdk publish --access public --no-git-checks --tag canary-$COMMIT_ID
run: pnpm -r --filter sdk publish --access public --no-git-checks --tag canary

- name: Reset version
run: git checkout -- packages/sdk/package.json pnpm-lock.yaml

0 comments on commit 57a3239

Please sign in to comment.