@robotical/martyblocks 3.0.13 → 3.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
name: Build and publish to npm
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches:
|
|
6
|
-
- 'master'
|
|
7
|
-
|
|
8
|
-
jobs:
|
|
9
|
-
build_and_release:
|
|
10
|
-
runs-on: ubuntu-20.04
|
|
11
|
-
|
|
12
|
-
env:
|
|
13
|
-
NODE_OPTIONS: "--max-old-space-size=5120" # locally export NODE_OPTIONS=--max-old-space-size=5120
|
|
14
|
-
MBHome: /home/runner/work/MartyBlocks/MartyBlocks
|
|
15
|
-
mblib: /home/runner/work/MartyBlocks/MartyBlocks/marty-blocks-lib/
|
|
16
|
-
REPLACEMENTS: /home/runner/work/MartyBlocks/MartyBlocks/marty-blocks-lib/replacements
|
|
17
|
-
blocks_original: /home/runner/work/MartyBlocks/MartyBlocks/scratch-blocks
|
|
18
|
-
|
|
19
|
-
steps:
|
|
20
|
-
|
|
21
|
-
- uses: actions/checkout@v2
|
|
22
|
-
with:
|
|
23
|
-
ref: ${{ github.event.inputs.branch || 'master' }}
|
|
24
|
-
|
|
25
|
-
- name: Set up Python 2.7
|
|
26
|
-
run: |
|
|
27
|
-
sudo apt-get update
|
|
28
|
-
sudo apt-get install python2.7
|
|
29
|
-
|
|
30
|
-
- name: Link python to python2.7
|
|
31
|
-
run: |
|
|
32
|
-
sudo ln -sf /usr/bin/python2.7 /usr/bin/python
|
|
33
|
-
|
|
34
|
-
- name: Use Node.js 16.20.1
|
|
35
|
-
uses: actions/setup-node@v3
|
|
36
|
-
with:
|
|
37
|
-
node-version: 16.20.1
|
|
38
|
-
|
|
39
|
-
- name: see node version
|
|
40
|
-
run: node -v
|
|
41
|
-
|
|
42
|
-
- name: see memory allocation
|
|
43
|
-
run: node -e 'console.log(`node heap limit = ${require("v8").getHeapStatistics().heap_size_limit / (1024 * 1024)} Mb`)'
|
|
44
|
-
|
|
45
|
-
- name: Clone repos
|
|
46
|
-
run: |
|
|
47
|
-
git clone -b develop https://github.com/llk/scratch-blocks.git --no-checkout ${{ env.blocks_original }}
|
|
48
|
-
|
|
49
|
-
- name: Checkout appropriate commit
|
|
50
|
-
run: |
|
|
51
|
-
cd ${{ env.blocks_original }} && git reset --hard f210e042988b91bcdc2abeca7a2d85e178edadb2
|
|
52
|
-
|
|
53
|
-
- name: Install scratch
|
|
54
|
-
run: |
|
|
55
|
-
cd ${{ env.blocks_original }} && npm install
|
|
56
|
-
|
|
57
|
-
- name: Install marty blocks library
|
|
58
|
-
run: |
|
|
59
|
-
cd ${{ env.mblib }}
|
|
60
|
-
npm install
|
|
61
|
-
|
|
62
|
-
- name: setting production environments
|
|
63
|
-
run: |
|
|
64
|
-
cd ${{ env.mblib }}
|
|
65
|
-
npx node set-production.js
|
|
66
|
-
|
|
67
|
-
- name: Link repositories
|
|
68
|
-
run: |
|
|
69
|
-
cd ${{ env.mblib }} && npm link
|
|
70
|
-
cd ${{ env.blocks_original }} && npm link && npm link marty-blocks-lib
|
|
71
|
-
|
|
72
|
-
- name: check if scracth-blocks linking worked
|
|
73
|
-
run: |
|
|
74
|
-
cd ${{ env.blocks_original }}
|
|
75
|
-
npm list || true
|
|
76
|
-
|
|
77
|
-
- name: Copy replacements
|
|
78
|
-
run: |
|
|
79
|
-
cp -r ${{ env.REPLACEMENTS }}/* ${{ env.MBHome }}
|
|
80
|
-
|
|
81
|
-
- name: console
|
|
82
|
-
run: |
|
|
83
|
-
cd ${{ env.blocks_original }}
|
|
84
|
-
npx uglify-js --version
|
|
85
|
-
|
|
86
|
-
- name: console 1
|
|
87
|
-
run: |
|
|
88
|
-
cd ${{ env.blocks_original }}
|
|
89
|
-
npm ls uglify-js
|
|
90
|
-
|
|
91
|
-
- name: Build Blocks
|
|
92
|
-
run: |
|
|
93
|
-
cd ${{ env.blocks_original }}
|
|
94
|
-
NODE_ENV=production npm run prepublish
|