-
Notifications
You must be signed in to change notification settings - Fork 9
63 lines (52 loc) · 1.73 KB
/
build.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
name: "Pre-release"
on:
push:
branches:
- "main"
paths:
- "cutcutgo.X/**"
- ".github/workflows/build.yml"
jobs:
pre-release:
name: "Pre-release"
runs-on: ubuntu-latest
env:
PROJECT_DIR: cutcutgo.X
TMP_DIR: tmp
RELEASE_DIR: release
APP_STANDALONE_NAME: Cutcutgo_maker1_standalone_app.hex
APP_UF2_NAME: Cutcutgo_maker1_bootloader_app.uf2
steps:
- id: step1
name: Checkout sources
uses: actions/checkout@v4
- id: step2
name: Create temporary directory
run: mkdir $TMP_DIR
- id: step3
name: Create release directory
run: mkdir $RELEASE_DIR
- id: step4
name: Build firmware
uses: Rockman18/ghactions-mplabx@master
with:
project: ${{ env.PROJECT_DIR }}
configuration: cutcutgo,cutcutgo_bl
- id: step5
name: Move standalone firmware
run: cp $PROJECT_DIR/dist/cutcutgo/production/cutcutgo.X.production.hex $RELEASE_DIR/$APP_STANDALONE_NAME
- id: step6
name: Convert bootloader app hex to bin
run: objcopy -Iihex -Obinary $PROJECT_DIR/dist/cutcutgo_bl/production/cutcutgo.X.production.hex $TMP_DIR/cutcutgo-app.bin
- id: step7
name: Convert bootloader app bin to UF2
run: ./utils/uf2conv.py -c -f 0x4d414b52 -b 0x1d010000 -o $RELEASE_DIR/$APP_UF2_NAME $TMP_DIR/cutcutgo-app.bin
- id: step8
name: Create pre-release
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ github.token }}"
automatic_release_tag: "latest"
prerelease: true
title: "Development Build"
files: ${{ env.RELEASE_DIR }}/**