Remove bump from CI (#2670)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov 2023-02-21 13:25:01 +06:00 committed by GitHub
parent d9df953c9e
commit 7befac7d55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
28 changed files with 115 additions and 75 deletions

View File

@ -330,63 +330,3 @@ jobs:
run: |
echo Pushing release of tag ${{ github.ref }}
node common/scripts/install-run-rush.js docker:push
npm-publish:
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
needs: [build, uitest, test, svelte-check]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Cache build results
uses: actions/cache@v3
env:
cache-name: cache-build-results
with:
path: |
cloud
common
deploy
dev
models
packages
plugins
pods
products
server
server-plugins
templates
tests
rush.json
.prettierrc
tools
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.sha }}
restore-keys: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.sha }}
- name: Installing...
run: node common/scripts/install-run-rush.js install
- name: Setting model version from git release...
run: node common/scripts/install-run-rush.js bump-model-version
- name: Build, to include new model version
run: node common/scripts/install-run-rush.js build
- name: Bundle
run: node common/scripts/install-run-rush.js bundle
- name: Login to NPM
run: |
echo @hcengineering/anticrm:https://npm.pkg.github.com/ > ~/.npmrc
echo '//npm.pkg.github.com/:_authToken=${{ secrets.NPM_TOKEN }}' >> ~/.npmrc
- name: NPM bump
run: node common/scripts/bump.js
- name: Create PR
uses: peter-evans/create-pull-request@v4
with:
commit-message: Bump packages
title: Bump packages
body: Bump packages
base: main
labels: automated-pr
branch: bump_packages
delete-branch: true

View File

@ -324,6 +324,14 @@
"description": "Format and autofix linting issues in changed projects",
"safeForSimultaneousRushProcesses": true,
"shellCommand": "./common/scripts/each-diff.sh rushx format"
},
{
"commandKind": "global",
"name": "bump-packages",
"summary": "Bump and publish packages from last tag",
"description": "Bump and publish packages from last tag",
"safeForSimultaneousRushProcesses": true,
"shellCommand": "node common/scripts/bump.js"
}
],

View File

@ -94,21 +94,17 @@ function bumpPackage (name, dependency, depVersion) {
function publish (name) {
const package = packages[name]
execSync(`cd ${package.path} && npm publish && cd ../..`, { encoding: 'utf-8' })
}
function getConfig () {
const res = execSync('node common/scripts/install-run-rush.js list -p --json', { encoding: 'utf-8' })
const index = res.indexOf('{')
const list = res.substring(index)
const config = JSON.parse(list)
return config
try {
execSync(`cd ${package.path} && npm publish && cd ../..`, { encoding: 'utf-8' })
} catch (err) {
console.log(err)
}
}
function main () {
const args = process.argv
const config = getConfig()
const config = JSON.parse(execSync('rush list -p --json', { encoding: 'utf-8' }))
fillPackages(config)
buildDependencyTree()
@ -116,11 +112,11 @@ function main () {
let changedPackages = []
if (args[2] === '-p') {
changedPackages = args[3].split(',').map((p) => `${repo}/${p}`)
} else if (args[2] === '-all') {
changedPackages = Object.keys(packages)
} else {
const tags = execSync(`git tag -l v* --sort=committerdate`, { encoding: 'utf-8' }).split('\n').filter((p) => p !== '')
const current = tags[tags.length - 1]
const last = tags[tags.length - 2]
const diff = execSync(`git diff ${current} ${last} --name-only --diff-filter=ACMR | sed 's| |\\ |g\'`, { encoding: 'utf-8' })
const tag = execSync(`git describe --tags --abbrev=0`, { encoding: 'utf-8' })
const diff = execSync(`git diff ${tag} --name-only --diff-filter=ACMR | sed 's| |\\ |g\'`, { encoding: 'utf-8' })
const changedFiles = diff.split('\n')
changedPackages = getChangedPackages(changedFiles)
}

View File

@ -31,5 +31,9 @@
"@hcengineering/platform": "^0.6.8",
"toposort": "^2.0.2",
"fast-equals": "^2.0.3"
},
"repository": "https://github.com/hcenginneing/anticrm",
"publishConfig": {
"registry": "https://npm.pkg.github.com"
}
}

View File

@ -42,5 +42,9 @@
"@hcengineering/activity": "^0.6.0",
"@hcengineering/calendar": "^0.6.2",
"@hcengineering/notification": "^0.6.5"
},
"repository": "https://github.com/hcenginneing/anticrm",
"publishConfig": {
"registry": "https://npm.pkg.github.com"
}
}

View File

@ -31,5 +31,9 @@
"@hcengineering/platform": "^0.6.8",
"@hcengineering/core": "^0.6.21",
"fast-equals": "^2.0.3"
},
"repository": "https://github.com/hcenginneing/anticrm",
"publishConfig": {
"registry": "https://npm.pkg.github.com"
}
}

View File

@ -32,5 +32,9 @@
"dependencies": {
"@hcengineering/platform": "^0.6.8",
"@hcengineering/activity": "^0.6.0"
},
"repository": "https://github.com/hcenginneing/anticrm",
"publishConfig": {
"registry": "https://npm.pkg.github.com"
}
}

View File

@ -31,5 +31,9 @@
"dependencies": {
"@hcengineering/platform": "^0.6.8",
"@hcengineering/attachment": "^0.6.1"
},
"repository": "https://github.com/hcenginneing/anticrm",
"publishConfig": {
"registry": "https://npm.pkg.github.com"
}
}

View File

@ -31,5 +31,9 @@
"dependencies": {
"@hcengineering/platform": "^0.6.8",
"@hcengineering/board": "^0.6.0"
},
"repository": "https://github.com/hcenginneing/anticrm",
"publishConfig": {
"registry": "https://npm.pkg.github.com"
}
}

View File

@ -34,5 +34,9 @@
"@hcengineering/ui": "^0.6.3",
"@hcengineering/preference": "^0.6.2",
"@hcengineering/tags": "^0.6.3"
},
"repository": "https://github.com/hcenginneing/anticrm",
"publishConfig": {
"registry": "https://npm.pkg.github.com"
}
}

View File

@ -31,5 +31,9 @@
"dependencies": {
"@hcengineering/platform": "^0.6.8",
"@hcengineering/calendar": "^0.6.2"
},
"repository": "https://github.com/hcenginneing/anticrm",
"publishConfig": {
"registry": "https://npm.pkg.github.com"
}
}

View File

@ -31,5 +31,9 @@
"dependencies": {
"@hcengineering/platform": "^0.6.8",
"@hcengineering/chunter": "^0.6.2"
},
"repository": "https://github.com/hcenginneing/anticrm",
"publishConfig": {
"registry": "https://npm.pkg.github.com"
}
}

View File

@ -31,5 +31,9 @@
"dependencies": {
"@hcengineering/platform": "^0.6.8",
"@hcengineering/contact": "^0.6.11"
},
"repository": "https://github.com/hcenginneing/anticrm",
"publishConfig": {
"registry": "https://npm.pkg.github.com"
}
}

View File

@ -31,5 +31,9 @@
"dependencies": {
"@hcengineering/platform": "^0.6.8",
"@hcengineering/hr": "^0.6.0"
},
"repository": "https://github.com/hcenginneing/anticrm",
"publishConfig": {
"registry": "https://npm.pkg.github.com"
}
}

View File

@ -30,5 +30,9 @@
"@hcengineering/core": "^0.6.21",
"@hcengineering/platform": "^0.6.8",
"@hcengineering/view": "^0.6.2"
},
"repository": "https://github.com/hcenginneing/anticrm",
"publishConfig": {
"registry": "https://npm.pkg.github.com"
}
}

View File

@ -32,5 +32,9 @@
"dependencies": {
"@hcengineering/platform": "^0.6.8",
"@hcengineering/inventory": "^0.6.0"
},
"repository": "https://github.com/hcenginneing/anticrm",
"publishConfig": {
"registry": "https://npm.pkg.github.com"
}
}

View File

@ -28,5 +28,9 @@
"dependencies": {
"@hcengineering/core": "^0.6.21",
"@hcengineering/platform": "^0.6.8"
},
"repository": "https://github.com/hcenginneing/anticrm",
"publishConfig": {
"registry": "https://npm.pkg.github.com"
}
}

View File

@ -28,5 +28,9 @@
"dependencies": {
"@hcengineering/platform": "^0.6.8",
"@hcengineering/ui": "^0.6.3"
},
"repository": "https://github.com/hcenginneing/anticrm",
"publishConfig": {
"registry": "https://npm.pkg.github.com"
}
}

View File

@ -31,5 +31,9 @@
"dependencies": {
"@hcengineering/platform": "^0.6.8",
"@hcengineering/notification": "^0.6.5"
},
"repository": "https://github.com/hcenginneing/anticrm",
"publishConfig": {
"registry": "https://npm.pkg.github.com"
}
}

View File

@ -31,5 +31,9 @@
"dependencies": {
"@hcengineering/platform": "^0.6.8",
"@hcengineering/recruit": "^0.6.6"
},
"repository": "https://github.com/hcenginneing/anticrm",
"publishConfig": {
"registry": "https://npm.pkg.github.com"
}
}

View File

@ -31,5 +31,9 @@
"dependencies": {
"@hcengineering/platform": "^0.6.8",
"@hcengineering/setting": "^0.6.2"
},
"repository": "https://github.com/hcenginneing/anticrm",
"publishConfig": {
"registry": "https://npm.pkg.github.com"
}
}

View File

@ -31,5 +31,9 @@
"dependencies": {
"@hcengineering/platform": "^0.6.8",
"@hcengineering/task": "^0.6.1"
},
"repository": "https://github.com/hcenginneing/anticrm",
"publishConfig": {
"registry": "https://npm.pkg.github.com"
}
}

View File

@ -32,5 +32,9 @@
"dependencies": {
"@hcengineering/platform": "^0.6.8",
"@hcengineering/templates": "^0.6.0"
},
"repository": "https://github.com/hcenginneing/anticrm",
"publishConfig": {
"registry": "https://npm.pkg.github.com"
}
}

View File

@ -29,5 +29,9 @@
"@hcengineering/platform": "^0.6.8",
"@hcengineering/core": "^0.6.21",
"@hcengineering/ui": "^0.6.3"
},
"repository": "https://github.com/hcenginneing/anticrm",
"publishConfig": {
"registry": "https://npm.pkg.github.com"
}
}

View File

@ -31,5 +31,9 @@
"dependencies": {
"@hcengineering/platform": "^0.6.8",
"@hcengineering/view": "^0.6.2"
},
"repository": "https://github.com/hcenginneing/anticrm",
"publishConfig": {
"registry": "https://npm.pkg.github.com"
}
}

View File

@ -32,5 +32,9 @@
"dependencies": {
"@hcengineering/platform": "^0.6.8",
"@hcengineering/workbench": "^0.6.2"
},
"repository": "https://github.com/hcenginneing/anticrm",
"publishConfig": {
"registry": "https://npm.pkg.github.com"
}
}

View File

@ -31,5 +31,9 @@
"@hcengineering/ui": "^0.6.3",
"@hcengineering/view": "^0.6.2",
"@hcengineering/preference": "^0.6.2"
},
"repository": "https://github.com/hcenginneing/anticrm",
"publishConfig": {
"registry": "https://npm.pkg.github.com"
}
}

View File

@ -1271,7 +1271,7 @@
{
"packageName": "@hcengineering/board",
"projectFolder": "plugins/board",
"shouldPublish": false
"shouldPublish": true
},
{
"packageName": "@hcengineering/board-assets",