mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix release process in light of changing to independent versioning (#7357)
* Remove workflow - Not applicable anymore since each package has its own version Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix daily-alpha to be based on core version Signed-off-by: Sebastian Malton <sebastian@malton.name> * lerna.json no longer will be updated during releases Signed-off-by: Sebastian Malton <sebastian@malton.name> * Use the prerelease parts of @k8slens/core to determine dist tag Signed-off-by: Sebastian Malton <sebastian@malton.name> --------- Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
3649070ca3
commit
e89ac54cd3
45
.github/workflows/bump-master-version.yaml
vendored
45
.github/workflows/bump-master-version.yaml
vendored
@ -1,45 +0,0 @@
|
|||||||
name: Bump Version on master
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
types:
|
|
||||||
- closed
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
release:
|
|
||||||
name: Release
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: ${{ github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'release') }}
|
|
||||||
steps:
|
|
||||||
- name: Checkout Release from lens
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
|
||||||
yarn install --frozen-lockfile
|
|
||||||
- name: Bump version to first alpha of next minor version
|
|
||||||
id: bump
|
|
||||||
run: |
|
|
||||||
CURRENT_VERSION=$(cat lerna.json | jq .version --raw-output)
|
|
||||||
|
|
||||||
if ! [[ "${CURRENT_VERSION}" =~ ^\d+\.\d+\.0$ ]]; then
|
|
||||||
echo "Not a minor release"
|
|
||||||
echo "status=skip" >> $GITHUB_OUTPUT
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
yarn bump-version preminor
|
|
||||||
|
|
||||||
echo "status=create" >> $GITHUB_OUTPUT
|
|
||||||
- uses: peter-evans/create-pull-request@v4
|
|
||||||
if: ${{ steps.bump.outputs.status == 'create' }}
|
|
||||||
with:
|
|
||||||
add-paths: lerna.json,packages/*/package.json
|
|
||||||
commit-message: Update package.json version to next preminor because of recent release
|
|
||||||
signoff: true
|
|
||||||
delete-branch: true
|
|
||||||
title: Update version to next preminor
|
|
||||||
labels: skip-changelog
|
|
||||||
2
.github/workflows/daily-alpha.yml
vendored
2
.github/workflows/daily-alpha.yml
vendored
@ -29,7 +29,7 @@ jobs:
|
|||||||
- name: Bump version
|
- name: Bump version
|
||||||
id: version
|
id: version
|
||||||
run: |
|
run: |
|
||||||
node packages/bump-version-for-cron/dist/index.js --path lerna.json
|
node packages/bump-version-for-cron/dist/index.js --path packages/core/package.json
|
||||||
- name: Check if branch already exists
|
- name: Check if branch already exists
|
||||||
id: check-branch
|
id: check-branch
|
||||||
run: git ls-remote --exit-code --tags origin v${{ steps.version.outputs.VERSION }}
|
run: git ls-remote --exit-code --tags origin v${{ steps.version.outputs.VERSION }}
|
||||||
|
|||||||
2
.github/workflows/publish-release-npm.yml
vendored
2
.github/workflows/publish-release-npm.yml
vendored
@ -38,7 +38,7 @@ jobs:
|
|||||||
- name: Publish NPM packages
|
- name: Publish NPM packages
|
||||||
run: |
|
run: |
|
||||||
npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
|
npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
|
||||||
VERSION=$(cat lerna.json | jq '.version' --raw-output)
|
VERSION=$(cat packages/core/package.json | jq '.version' --raw-output)
|
||||||
echo ${VERSION}
|
echo ${VERSION}
|
||||||
DIST_TAG=$(node packages/semver/dist/index.js --prerelease 0 ${VERSION})
|
DIST_TAG=$(node packages/semver/dist/index.js --prerelease 0 ${VERSION})
|
||||||
npx lerna \
|
npx lerna \
|
||||||
|
|||||||
@ -158,7 +158,7 @@ async function createReleaseBranchAndCommit(prBase: string, version: SemVer, prB
|
|||||||
const prBranch = `release/v${version.format()}`;
|
const prBranch = `release/v${version.format()}`;
|
||||||
|
|
||||||
await pipeExecFile("git", ["checkout", "-b", prBranch]);
|
await pipeExecFile("git", ["checkout", "-b", prBranch]);
|
||||||
await pipeExecFile("git", ["add", "lerna.json", "packages/*/package.json"]);
|
await pipeExecFile("git", ["add", "packages/*/package.json"]);
|
||||||
await pipeExecFile("git", ["commit", "-sm", `Release ${version.format()}`]);
|
await pipeExecFile("git", ["commit", "-sm", `Release ${version.format()}`]);
|
||||||
await pipeExecFile("git", ["push", "--set-upstream", "origin", prBranch]);
|
await pipeExecFile("git", ["push", "--set-upstream", "origin", prBranch]);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user