mirror of
https://github.com/micropython/micropython.git
synced 2026-04-26 19:00:23 +02:00
da0149f629
Avoids a vague error from the 'vcs' versioning scheme if recent tags haven't been pushed to the fork. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
40 lines
1.1 KiB
YAML
40 lines
1.1 KiB
YAML
name: Package mpremote
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
paths:
|
|
- '.github/workflows/*.yml'
|
|
- 'tools/**'
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
# Setting this to zero means fetch all history and tags,
|
|
# which hatch-vcs can use to discover the version tag.
|
|
fetch-depth: 0
|
|
- uses: actions/setup-python@v6
|
|
- name: Install build tools
|
|
run: pip install build
|
|
- name: Build mpremote wheel
|
|
run: |
|
|
if ! git rev-parse --verify -q v1.23.0 >/dev/null; then
|
|
echo "::error::mpremote wheel build requires recent MicroPython version tags in the forked repo."
|
|
echo ""
|
|
echo "To fix, push tags from upstream:"
|
|
echo " git remote add upstream https://github.com/micropython/micropython.git"
|
|
echo " git fetch upstream --tags"
|
|
echo " git push origin --tags"
|
|
exit 1
|
|
fi
|
|
cd tools/mpremote && python -m build --wheel
|
|
- name: Archive mpremote wheel
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: mpremote
|
|
path: |
|
|
tools/mpremote/dist/mpremote*.whl
|