mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-07-26 23:08:11 +00:00
35 lines
998 B
YAML
35 lines
998 B
YAML
name: Setup Build Environment
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
|
|
- name: Init Cache
|
|
uses: actions/cache@v5
|
|
with:
|
|
path: |
|
|
~/.cache/pip
|
|
~/.platformio/.cache
|
|
key: ${{ runner.os }}-pio
|
|
|
|
- name: Install Python
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: '3.13'
|
|
|
|
- name: Install PlatformIO
|
|
shell: bash
|
|
run: |
|
|
pip install --upgrade platformio
|
|
|
|
# a git tag of "room-server-v1.2.3" should set "v1.2.3" as GIT_TAG_VERSION
|
|
# a git tag of "wio-tracker-v1.15-plus.1.3" should set "v1.15-plus.1.3" as GIT_TAG_VERSION
|
|
# a git tag of "v1.11" should set "v1.11" as GIT_TAG_VERSION
|
|
- name: Extract Version from Git Tag
|
|
shell: bash
|
|
run: |
|
|
GIT_TAG_NAME="${GITHUB_REF#refs/tags/}"
|
|
case "$GIT_TAG_NAME" in
|
|
v*) echo "GIT_TAG_VERSION=${GIT_TAG_NAME}" >> $GITHUB_ENV ;;
|
|
*) echo "GIT_TAG_VERSION=v${GIT_TAG_NAME#*-v}" >> $GITHUB_ENV ;;
|
|
esac
|