diff --git a/.changeset/modern-houses-study.md b/.changeset/modern-houses-study.md new file mode 100644 index 0000000..a845151 --- /dev/null +++ b/.changeset/modern-houses-study.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index e53957e..562b760 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,5 +1,6 @@ -name: Build, Test & Publish Block +name: Build, test and release Platforma Block on: + merge_group: pull_request: types: [opened, reopened, synchronize] branches: @@ -19,18 +20,17 @@ jobs: run: needs: - init - uses: milaboratory/github-ci/.github/workflows/node-docker-simple-fast-pnpm.yaml@v4 + uses: milaboratory/github-ci/.github/workflows/node-simple-pnpm.yaml@v4 with: - app-name: Samples & Data - app-name-slug: 'samples-and-data' + app-name: 'Block: Samples & Data' + app-name-slug: 'block-samples-and-data' notify-telegram: true node-version: '20.x' - - build-script-name: 'build-block' + build-script-name: 'build' pnpm-recursive-build: false test: true - test-script-name: 'test-block' + test-script-name: 'test' pnpm-recursive-tests: false publish-to-public: 'true' @@ -39,20 +39,24 @@ jobs: { "registries": { "https://registry.npmjs.org/": { - "scopes": ["platforma-open"], + "scopes": ["milaboratories", "platforma-sdk", "platforma-open"], "tokenVar": "NPMJS_TOKEN" } } } secrets: env: | - { - "PL_LICENSE": ${{ toJSON(secrets.MI_LICENSE) }}, + { "PL_LICENSE": ${{ toJSON(secrets.MI_LICENSE) }}, "MI_LICENSE": ${{ toJSON(secrets.MI_LICENSE) }}, "NPMJS_TOKEN": ${{ toJSON(secrets.NPMJS_TOKEN) }}, "PL_CI_TEST_USER": ${{ toJSON(secrets.PL_CI_TEST_USER) }}, "PL_CI_TEST_PASSWORD": ${{ toJSON(secrets.PL_CI_TEST_PASSWORD) }}, - "AWS_CI_IAM_MONOREPO_SIMPLE_ROLE": ${{ toJSON(secrets.AWS_CI_IAM_MONOREPO_SIMPLE_ROLE) }} - } + + "AWS_CI_IAM_MONOREPO_SIMPLE_ROLE": ${{ toJSON(secrets.AWS_CI_IAM_MONOREPO_SIMPLE_ROLE) }}, + "AWS_CI_TURBOREPO_S3_BUCKET": ${{ toJSON(secrets.AWS_CI_TURBOREPO_US_S3_BUCKET) }} } + TELEGRAM_NOTIFICATION_TARGET: ${{ secrets.TG_CHANNEL_MIBUILDS }} TELEGRAM_API_TOKEN: ${{ secrets.TG_CI_BOT_TOKEN }} + + GH_ZEN_APP_ID: ${{ secrets.GH_ZEN_APP_ID }} + GH_ZEN_APP_PRIVATE_KEY: ${{ secrets.GH_ZEN_APP_PRIVATE_KEY }} diff --git a/index.d.ts b/block/index.d.ts similarity index 100% rename from index.d.ts rename to block/index.d.ts diff --git a/index.js b/block/index.js similarity index 100% rename from index.js rename to block/index.js diff --git a/block/package.json b/block/package.json new file mode 100644 index 0000000..c8747c6 --- /dev/null +++ b/block/package.json @@ -0,0 +1,47 @@ +{ + "name": "@platforma-open/milaboratories.samples-and-data", + "version": "1.7.0", + "scripts": { + "pretty": "prettier --write \"./**/*.{js,jsx,mjs,cjs,ts,tsx,json,vue}\"", + "build": "rm -rf block-pack && block-tools pack", + "prepublishOnly": "block-tools pack && block-tools publish -r 's3://milab-euce1-prod-pkgs-s3-block-registry/pub/releases/?region=eu-central-1'" + }, + "files": [ + "index.d.ts", + "index.js" + ], + "dependencies": { + "@platforma-sdk/model": "catalog:", + "@platforma-open/milaboratories.samples-and-data.workflow": "workspace:*", + "@platforma-open/milaboratories.samples-and-data.model": "workspace:*", + "@platforma-open/milaboratories.samples-and-data.ui": "workspace:*" + }, + "block": { + "components": { + "workflow": "@platforma-open/milaboratories.samples-and-data.workflow/dist/tengo/tpl/main.plj.gz", + "model": "@platforma-open/milaboratories.samples-and-data.model/dist/model.json", + "ui": "@platforma-open/milaboratories.samples-and-data.ui/dist" + }, + "meta": { + "title": "Samples & Data", + "logo": "file:../logos/block-logo.png", + "url": "https://github.com/platforma-open/samples-and-data", + "docs": "https://github.com/platforma-open/samples-and-data/docs", + "support": "mailto:support@milaboratories.com", + "description": "Allows to create samples, specify sample meta information and link samples to sequencing data", + "longDescription": "file:../docs/description.md", + "changelog": "file:../CHANGELOG.md", + "tags": [], + "organization": { + "name": "MiLaboratories Inc", + "url": "https://milaboratories.com/", + "logo": "file:../logos/organization-logo.png" + }, + "marketplaceRanking": 10000 + } + }, + "devDependencies": { + "@platforma-sdk/block-tools": "catalog:" + }, + "packageManager": "pnpm@9.12.0" +} diff --git a/package.json b/package.json index 1e8272c..6cb5bb3 100644 --- a/package.json +++ b/package.json @@ -1,51 +1,15 @@ { "name": "@platforma-open/milaboratories.samples-and-data", - "version": "1.7.0", "scripts": { "pretty": "prettier --write \"./**/*.{js,jsx,mjs,cjs,ts,tsx,json,vue}\"", - "build-block": "turbo run build && rm -rf block-pack && block-tools pack", - "build-block-force": "turbo run build --force && rm -rf block-pack/* && block-tools pack", - "test-block": "turbo run test --concurrency 1", + "build": "turbo run build", + "test": "turbo run test --concurrency 1", "watch": "turbo watch build", - "prepublishOnly": "block-tools pack && block-tools publish -r 's3://milab-euce1-prod-pkgs-s3-block-registry/pub/releases/?region=eu-central-1'" - }, - "files": [ - "index.d.ts", - "index.js" - ], - "dependencies": { - "@platforma-sdk/model": "catalog:", - "@platforma-open/milaboratories.samples-and-data.workflow": "workspace:*", - "@platforma-open/milaboratories.samples-and-data.model": "workspace:*", - "@platforma-open/milaboratories.samples-and-data.ui": "workspace:*" - }, - "block": { - "components": { - "workflow": "@platforma-open/milaboratories.samples-and-data.workflow/dist/tengo/tpl/main.plj.gz", - "model": "@platforma-open/milaboratories.samples-and-data.model/dist/model.json", - "ui": "@platforma-open/milaboratories.samples-and-data.ui/dist" - }, - "meta": { - "title": "Samples & Data", - "logo": "file:logos/block-logo.png", - "url": "https://github.com/milaboratory/block-samples-and-data", - "docs": "https://github.com/milaboratory/block-samples-and-data/docs", - "support": "mailto:support@milaboratories.com", - "description": "Allows to create samples, specify sample meta information and link samples to sequencing data", - "longDescription": "file:./docs/description.md", - "changelog": "file:CHANGELOG.md", - "tags": [], - "organization": { - "name": "MiLaboratories Inc", - "url": "https://milaboratories.com/", - "logo": "file:logos/organization-logo.png" - }, - "marketplaceRanking": 10000 - } + "changeset": "changeset", + "version-packages": "changeset version" }, "devDependencies": { "turbo": "catalog:", - "@platforma-sdk/block-tools": "catalog:", "@changesets/cli": "catalog:" }, "packageManager": "pnpm@9.12.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c68c37c..9a9e332 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -97,29 +97,32 @@ catalogs: importers: .: + devDependencies: + '@changesets/cli': + specifier: 'catalog:' + version: 2.27.10 + turbo: + specifier: 'catalog:' + version: 2.3.0 + + block: dependencies: '@platforma-open/milaboratories.samples-and-data.model': specifier: workspace:* - version: link:model + version: link:../model '@platforma-open/milaboratories.samples-and-data.ui': specifier: workspace:* - version: link:ui + version: link:../ui '@platforma-open/milaboratories.samples-and-data.workflow': specifier: workspace:* - version: link:workflow + version: link:../workflow '@platforma-sdk/model': specifier: 'catalog:' version: 1.10.2 devDependencies: - '@changesets/cli': - specifier: 'catalog:' - version: 2.27.10 '@platforma-sdk/block-tools': specifier: 'catalog:' version: 2.3.25 - turbo: - specifier: 'catalog:' - version: 2.3.0 model: dependencies: @@ -147,7 +150,7 @@ importers: dependencies: this-block: specifier: workspace:@platforma-open/milaboratories.samples-and-data@* - version: link:.. + version: link:../block devDependencies: '@platforma-sdk/test': specifier: 'catalog:' diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index fe89d49..3b0df39 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -3,7 +3,7 @@ packages: - model - ui - test - - . + - block catalog: '@platforma-sdk/block-tools': ^2.3.25 diff --git a/turbo.json b/turbo.json index 5518a06..184ca9b 100644 --- a/turbo.json +++ b/turbo.json @@ -1,7 +1,6 @@ { "$schema": "https://turbo.build/schema.json", "globalDependencies": ["tsconfig.json"], - "extends": ["//"], "tasks": { "build": { "inputs": ["$TURBO_DEFAULT$"],