-
Notifications
You must be signed in to change notification settings - Fork 0
96 lines (92 loc) · 2.89 KB
/
makecode-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: MakeCode Arcade Binary Release
on:
release:
types:
- created
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [8.x]
steps:
- uses: actions/checkout@v1
- name: install node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: install makecode
run: |
npm install -g pxt
pxt target arcade
- name: build js
run: |
pxt clean
pxt install
pxt build --cloud
- name: upload js
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./built/debug/binary.js
asset_name: arcade.js
asset_content_type: application/octet-stream
- name: build D51
run: |
pxt clean
pxt install --hw samd51
pxt build --hw samd51 --cloud
cp ./built/binary.uf2 binary-d51.uf2
- name: upload D51
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./built/binary.uf2
asset_name: arcade-d51.uf2
asset_content_type: application/octet-stream
- name: build F4
run: |
pxt clean
pxt install --hw stm32f401
pxt build --hw stm32f401 --cloud
cp ./built/binary.uf2 binary-f4.uf2
- name: upload F4
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./built/binary.uf2
asset_name: arcade-f4.uf2
asset_content_type: application/octet-stream
- name: build P0
run: |
pxt clean
pxt install --hw rpi
pxt build --hw rpi --cloud
cp ./built/binary.uf2 binary-p0.uf2
- name: upload P0
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./built/binary.uf2
asset_name: arcade-p0.uf2
asset_content_type: application/octet-stream
- name: bundle all
run: |
cat binary-*.uf2 > built/arcade-all.uf2
- name: upload bundled
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./built/arcade-all.uf2
asset_name: arcade-all.uf2
asset_content_type: application/octet-stream