Skip to content

Commit

Permalink
fix: create unique package versions for nightly releases
Browse files Browse the repository at this point in the history
  • Loading branch information
smrz2001 committed Feb 7, 2024
1 parent 08f5cb5 commit 1fd10a3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/reusable-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,8 @@ jobs:
run: |
git config user.email "${{ github.actor }}@users.noreply.github.com"
git config user.name ${{ github.actor }}
SHA_TAG=$(echo ${{ github.SHA }} | head -c 8)
echo "SHA_TAG=$SHA_TAG" >> $GITHUB_ENV
-
name: Install Dagger
uses: dagger/dagger-for-github@v3
Expand Down Expand Up @@ -316,7 +318,7 @@ jobs:
# First try to publish all the packages. Once a release or RC is made, all the package versions get bumped
# and we want to publish nightly packages for the new versions. If this fails, presumably because some
# packages have not changed since the last release, we'll try to publish only the packages that did change.
npm run publish:nightly -- --force-publish --yes
npm run publish:nightly -- --preid "nightly.${{ env.SHA_TAG }}" --force-publish --yes
# If we reached here then the publish succeeded and we can exit the workflow
exit 0
continue-on-error: true
Expand All @@ -329,4 +331,4 @@ jobs:
run: |
npm config set //registry.npmjs.org/:_authToken $NODE_AUTH_TOKEN
git reset --hard HEAD^
npm run publish:nightly -- --yes || true
npm run publish:nightly -- --preid "nightly.${{ env.SHA_TAG }}" --yes || true
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"publish:release-candidate-followup": "npx lerna publish --dist-tag next --preid rc --no-verify-access --conventional-prerelease",
"publish:release": "npx lerna publish --dist-tag latest --create-release github --no-verify-access --conventional-graduate bump minor",
"publish:hotfix": "npx lerna publish --dist-tag latest --no-verify-access --conventional-graduate bump patch",
"publish:nightly": "npx lerna publish --dist-tag nightly --no-verify-access --conventional-prerelease --preid nightly --no-push",
"publish:nightly": "npx lerna publish --dist-tag nightly --no-verify-access --conventional-prerelease --no-push",
"format": "npx prettier --write 'packages/**/src/**/*{.ts,.tsx,.js}'",
"lint": "npx lerna run lint && npx prettier --check packages/**/src/**/*.ts",
"clean": "npm run clean:deps && npm run clean:coverage && npm run clean:build-artifacts",
Expand Down

0 comments on commit 1fd10a3

Please sign in to comment.