Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(lerna): aggressive patch bump #1163

Open
wants to merge 16 commits into
base: release-v10
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 27 additions & 8 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,16 @@ jobs:
${{
!contains(github.event.commits[0].message, '[skip-ci]') &&
(
startsWith(github.event.commits[0].message, 'fix:') ||
startsWith(github.event.commits[0].message, 'fix(') ||
startsWith(github.event.commits[0].message, 'feat:') ||
startsWith(github.event.commits[0].message, 'feat(') ||
contains(github.event.commits[0].message, '[release]')
# if the branch is master and with [release tag]
(github.ref == 'ref/heads/master' && contains(github.event.commits[0].message, '[release]')) ||
# Or release branch with fix/feat/[release]
(startswith(github.ref, 'ref/heads/release-') &&
startsWith(github.event.commits[0].message, 'fix:') ||
startsWith(github.event.commits[0].message, 'fix(') ||
startsWith(github.event.commits[0].message, 'feat:') ||
startsWith(github.event.commits[0].message, 'feat(') ||
contains(github.event.commits[0].message, '[release]'))
)
)
}}
runs-on: ubuntu-latest
Expand Down Expand Up @@ -85,13 +90,27 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GH_LERNA_TOKEN }} # Temporary fix to make lerna able to push the new versions commit to master
GITHUB_TOKEN: ${{ secrets.GH_LERNA_TOKEN }} # Temporary fix to make lerna able to push the new versions commit to master
run: yarn lerna version --conventional-commits --conventional-prerelease --preid rc --create-release github --no-private --yes

run: |
if [[ "${{ github.ref }}" == "ref/head/master" ]]; then
if [[ "${{ contains(github.event.commits[0].message, '[bump-version]') }}" == "true"]]; then
yarn lerna version --conventional-commits --create-release github --no-private --yes
SudilHasithaCognite marked this conversation as resolved.
Show resolved Hide resolved
fi
elif [[ "${{ github.ref }}" == ref/head/release-* ]]; then
if [[ "${{ contains(github.event.commits[0].message, '[bump-version]') }}" == "true"]]; then
SudilHasithaCognite marked this conversation as resolved.
Show resolved Hide resolved
yarn lerna version --conventional-commits --conventional-prerelease --preid rc --create-release github --no-private --yes
fi
fi
- name: Lerna Publish
if: contains(github.event.commits[0].message,'[release]')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
run: yarn lerna publish from-package --pre-dist-tag rc --yes --no-git-reset --no-verify-access
run: |
if [[ "${{ github.ref }}" == "ref/head/master" ]]; then
yarn lerna publish from-package --yes --no-git-reset --no-verify-access
elif [[ "${{ github.ref }}" == ref/head/release-* ]]; then
yarn lerna publish from-package --pre-dist-tag rc --yes --no-git-reset --no-verify-access
fi

# - name: Publish documentation
# uses: JamesIves/github-pages-deploy-action@releases/v3
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"**/*.test.ts"
],
"message": "chore(release): publish new package versions [skip ci]",
"allowBranch": "release-v10"
"allowBranch": ["master", "release-*"]
}
}
}
Loading