Skip to content

increment version

increment version #11

Workflow file for this run

name: Create uf2 release for new version tag
on:
push:
tags:
- "v*"
jobs:
compile-uf2:
runs-on: ubuntu-22.04
steps:
- name: clone EuroPi
uses: actions/checkout@v3
with:
path: europi
- name: clone micropython
uses: actions/checkout@v3
with:
repository: micropython/micropython
ref: v1.20.0
path: micropython
- name: install os deps
run: sudo apt-get install -y cmake gcc-arm-none-eabi libnewlib-arm-none-eabi build-essential
- name: prepare micropython build
working-directory: micropython
run: make -C ports/rp2 submodules && make -C mpy-cross
- name: copy europi into micropython modules
run: |
mkdir micropython/ports/rp2/modules/contrib
mkdir micropython/ports/rp2/modules/experimental
cp -r europi/software/firmware/*.py micropython/ports/rp2/modules
cp -r europi/software/firmware/experimental/*.py micropython/ports/rp2/modules/experimental
cp -r europi/software/contrib/*.py micropython/ports/rp2/modules/contrib
- name: install ssd1306 library
run: wget https://raw.githubusercontent.com/stlehmann/micropython-ssd1306/master/ssd1306.py -O micropython/ports/rp2/modules/ssd1306.py
- name: increase virtual filesystem progsize
run: sed -i 's/progsize=256)/progsize=1024)/g' micropython/ports/rp2/modules/_boot.py
- name: create main.py entrypoint
run: |
cat <<EOF >> micropython/ports/rp2/modules/main.py
import gc
gc.collect()
from contrib.menu import *
BootloaderMenu(EUROPI_SCRIPTS).main()
EOF
- name: "[debug] print modules folder"
run: tree micropython/ports/rp2/modules
- name: compile micropython and firmware modules
working-directory: micropython/ports/rp2
run: make
- name: create release asset version
id: release-asset-version
run: |
VERSION=`grep -oP '(?<=")[\d\.]+(?=")' micropython/ports/rp2/modules/version.py`
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
- name: rename firmware file with version info
run: cp micropython/ports/rp2/build-PICO/firmware.uf2 europi-v${{ steps.release-asset-version.outputs.VERSION }}.uf2
- name: create github release
uses: "marvinpinto/action-automatic-releases@v1.2.1"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
files: europi-v${{ steps.release-asset-version.outputs.VERSION }}.uf2