Skip to content

Commit b288f98

Browse files
Updated build script
- Updated build script to build in github actions, release new version with micropython.bin
1 parent 5dfb36e commit b288f98

File tree

1 file changed

+27
-2
lines changed

1 file changed

+27
-2
lines changed

.github/workflows/build_script.yml

+27-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ on:
99
jobs:
1010
build-micropython:
1111
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write
1214

1315
steps:
1416
- name: Checkout Repository
@@ -26,9 +28,12 @@ jobs:
2628
- name: Install libraries
2729
run: |
2830
pushd lib/micropython
29-
git submodule update --init lib/berkeley-db-1.xx lib/micropython-lib
31+
git submodule update --init lib/berkeley-db-1.xx lib/micropython-lib
3032
popd
31-
33+
34+
- name: Get Version Tag
35+
id: version_tag
36+
run: echo "tag=v$(date +'%Y.%m.%d')-build-${GITHUB_RUN_NUMBER}" >> $GITHUB_OUTPUT
3237

3338
- name: Building mpy-cross
3439
run: make -C lib/micropython/mpy-cross
@@ -50,3 +55,23 @@ jobs:
5055
with:
5156
name: micropython
5257
path: boards/OBO_CAR/build/micropython.bin
58+
59+
- name: Create release
60+
id: create-new-obo-car-image-release
61+
env:
62+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
63+
tag: ${{ steps.version_tag.outputs.tag }}
64+
run: |
65+
gh release create "${{ steps.version_tag.outputs.tag }}" \
66+
--repo="$GITHUB_REPOSITORY" \
67+
--title="Obo Car Micropython - ${{ steps.version_tag.outputs.tag }}" \
68+
--generate-notes
69+
70+
71+
- name: Upload Binary to Release
72+
env:
73+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
74+
run: |
75+
gh release upload "${{steps.version_tag.outputs.tag }}" \
76+
boards/OBO_CAR/build/micropython.bin
77+

0 commit comments

Comments
 (0)