Skip to content

Commit 9fff474

Browse files
authored
Merge pull request #237 from webdriverio/chore/fix-release-workflow
fix(ci): create monorepo v* tags and GitHub Releases instead of per-package changeset tags
2 parents 66309cf + 22fde3c commit 9fff474

2 files changed

Lines changed: 26 additions & 4 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,33 @@ jobs:
3939
run: pnpm install --frozen-lockfile
4040
- name: Build
4141
run: pnpm -r build
42-
- name: Consume changesets and publish
42+
- name: Consume changesets
4343
run: |
4444
npx changeset version
45-
npx changeset publish --tag "$DIST_TAG"
46-
git push origin main --follow-tags
45+
46+
# Bump the monorepo root version so tags always advance.
47+
# The root is private (never published) and drives the v* tag.
48+
npm version minor --no-git-tag-version
49+
git commit --amend --no-edit
50+
51+
- name: Publish
4752
env:
48-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4953
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
5054
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
5155
DIST_TAG: ${{ inputs.distTag }}
56+
run: npx changeset publish --tag "${DIST_TAG}" --no-git-tag
57+
58+
- name: Push version commit
59+
run: git push origin main
60+
61+
- name: GitHub Release & Tag
62+
env:
63+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
64+
run: |
65+
TAG="v$(jq -r '.version' package.json)"
66+
git tag "$TAG"
67+
git push origin "$TAG"
68+
gh release create "$TAG" \
69+
--title "$TAG" \
70+
--generate-notes \
71+
--verify-tag

‎package.json‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{
22
"name": "devtools-monorepo",
3+
"version": "10.6.1",
4+
"private": true,
35
"type": "module",
46
"scripts": {
57
"build": "pnpm -r build",

0 commit comments

Comments
 (0)