Skip to content

Commit

Permalink
feat: Update CI to build branch named unstable releases, fixing dupli…
Browse files Browse the repository at this point in the history
…cate versions when multiple feature branches exist simultaneously
  • Loading branch information
nklomp authored and sanderPostma committed Oct 4, 2024
1 parent 1c1b668 commit be5ceef
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/build-test-publish-on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,18 +81,25 @@ jobs:
- name: diff
run: git diff

- name: Sets PREID
env:
name: "${{github.ref_name}}"
run: |
echo "PRE_ID=${name//[\/_-]/.}" >> $GITHUB_ENV
- name: publish @latest when on main
if: github.ref == 'refs/heads/main'
run: pnpm publish:latest
run: lerna publish --conventional-commits --force-publish --include-merged-tags --sync-dist-version --create-release github --yes --dist-tag latest --registry https://registry.npmjs.org

- name: publish @next when on develop
if: github.ref == 'refs/heads/develop'
run: pnpm publish:next
run: lerna publish --conventional-prerelease --force-publish --canary --sync-dist-version --no-git-tag-version --include-merged-tags --preid next --pre-dist-tag next --yes --registry https://registry.npmjs.org",

- name: publish @next when on fix
- name: publish @next when on fix branch
if: startsWith(github.ref, 'refs/heads/fix')
run: pnpm publish:next
run: lerna publish --conventional-prerelease --force-publish --canary --sync-dist-version --no-git-tag-version --include-merged-tags --preid fix --pre-dist-tag fix --yes --registry https://registry.npmjs.org",

- name: publish @unstable when on unstable branch
if: startsWith(github.ref, 'refs/heads/feat')
run: pnpm publish:unstable
run: lerna publish --conventional-prerelease --force-publish --canary --sync-dist-version --no-git-tag-version --include-merged-tags --preid $PRE_ID --pre-dist-tag unstable --yes --throttle-size 75 --registry https://registry.npmjs.org

0 comments on commit be5ceef

Please sign in to comment.