Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
67 changes: 67 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Build, Test and Release Platforma Block
on:
merge_group:
pull_request:
types: [opened, reopened, synchronize]
branches:
- 'main'
push:
branches:
- 'main'
workflow_dispatch: {}
jobs:
init:
if: github.repository != 'milaboratory/platforma-block-boilerplate'
runs-on: ubuntu-latest
steps:
- uses: milaboratory/github-ci/actions/context/init@v4
with:
version-canonize: false
branch-versioning: main
run:
if: github.repository != 'milaboratory/platforma-block-boilerplate'
needs:
- init
uses: milaboratory/github-ci/.github/workflows/node-simple-pnpm.yaml@v4
with:
app-name: 'Block: block-boilerplate'
app-name-slug: 'block-block-boilerplate'
notify-telegram: true
node-version: '20.x'
build-script-name: 'build'
pnpm-recursive-build: false
test: false
test-script-name: 'test'
pnpm-recursive-tests: false
team-id: 'ciplopen'

publish-to-public: 'true'
package-path: 'block'
create-tag: 'true'

npmrc-config: |
{
"registries": {
"https://registry.npmjs.org/": {
"scopes": ["milaboratories", "platforma-sdk", "platforma-open"],
"tokenVar": "NPMJS_TOKEN"
}
}
}
secrets:
env: |
{ "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_TURBOREPO_S3_BUCKET": ${{ toJSON(secrets.AWS_CI_TURBOREPO_US_S3_BUCKET) }},
"PL_REGISTRY_PLATFORMA_OPEN_UPLOAD_URL": ${{ toJSON(secrets.PL_REGISTRY_PLOPEN_UPLOAD_URL) }} }

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 }}
37 changes: 37 additions & 0 deletions .github/workflows/mark-stable.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Mark Platforma Block as Stable
on:
workflow_dispatch: {}
jobs:
init:
if: github.repository != 'milaboratory/platforma-block-boilerplate'
runs-on: ubuntu-latest
steps:
- uses: milaboratory/github-ci/actions/context/init@v4
with:
version-canonize: false
branch-versioning: main
run:
if: github.repository != 'milaboratory/platforma-block-boilerplate'
needs:
- init
uses: milaboratory/github-ci/.github/workflows/block-mark-stable.yaml@v4
with:
app-name: 'Block: block-boilerplate - Mark Stable'
notify-telegram: true
node-version: '20.x'
npmrc-config: |
{
"registries": {
"https://registry.npmjs.org/": {
"scopes": ["milaboratories", "platforma-sdk", "platforma-open"],
"tokenVar": "NPMJS_TOKEN"
}
}
}
secrets:
env: |
{ "NPMJS_TOKEN": ${{ toJSON(secrets.NPMJS_TOKEN) }},
"AWS_CI_IAM_MONOREPO_SIMPLE_ROLE": ${{ toJSON(secrets.AWS_CI_IAM_MONOREPO_SIMPLE_ROLE) }} }

TELEGRAM_NOTIFICATION_TARGET: ${{ secrets.TG_CHANNEL_MIBUILDS }}
TELEGRAM_API_TOKEN: ${{ secrets.TG_CI_BOT_TOKEN }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ log/
vite.config.*.timestamp-*
software/**/*.sw.json
software/*.tgz
.DS_Store
.DS_Store
.vscode/sftp.json
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
"build": "turbo run build",
"build:dev": "env PL_PKG_DEV=local turbo run build",
"test": "env PL_PKG_DEV=local turbo run test --concurrency 1 --env-mode=loose",
"mark-stable": "turbo run mark-stable",
"watch": "turbo watch build",
"lint": "pnpm -r lint",
"changeset": "changeset",
"version-packages": "changeset version",
"update-sdk": "node scripts/update-sdk-packages.js"
},
"files": [
Expand Down
5 changes: 3 additions & 2 deletions software/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
"type": "module",
"description": "Block Software",
"scripts": {
"do-pack": "rm -f *.tgz && pl-pkg build && pnpm pack && mv platforma-open*.tgz package.tgz",
"changeset": "changeset",
"version-packages": "changeset version",
"build": "pl-pkg build",
"test": "true",

"prepublishOnly": "pl-pkg publish packages"
},
"block-software": {
Expand Down
6 changes: 5 additions & 1 deletion turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"build": {
"inputs": ["$TURBO_DEFAULT$"],
"env": ["PL_PKG_DEV"],
"outputs": ["./dist/**"],
"outputs": ["./dist/**", "./block-pack/**", "./pkg-*.tgz"],
"dependsOn": ["^build"]
},
"build:dev": {
Expand All @@ -15,6 +15,10 @@
"test": {
"dependsOn": ["^build:dev", "build"],
"passThroughEnv": ["PL_ADDRESS", "PL_TEST_PASSWORD", "PL_TEST_USER", "PL_TEST_PROXY", "DEBUG"]
},
"mark-stable": {
"passThroughEnv": ["PL_REGISTRY", "AWS_*"],
"cache": false
}
}
}