Skip to content

Release

Release #31

Workflow file for this run

name: Release
on:
release:
types: [published]
jobs:
build-upload:
runs-on: ubuntu-latest
name: Build and upload Assets to Release
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.7"
- name: Install platformio
run: |
python -m pip install --upgrade pip
pip install platformio
- name: Set version tag from git
run: sed -i "s/version_tag/${GITHUB_REF#refs/tags/}/g" main/User_config.h scripts/latest_version.json
- name: Extract ESP32 platform version from platformio.ini
run: |
ESP32_VERSION=$(grep 'esp32_platform\s*=' platformio.ini | cut -d'@' -f2 | tr -d '[:space:]')
echo "ESP32_PLATFORM_VERSION=${ESP32_VERSION}" >> $GITHUB_ENV
- name: Trigger framework installation
run: platformio run -e esp32dev-all-test
- name: Replace libbtdm_app.a file
run: cp lib/esp32-bt-lib/esp32/libbtdm_app.a $HOME/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/ld/libbtdm_app.a
- name: Verify file replacement
run: |
echo "Listing the file at the target location:"
ls -ltr $HOME/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/ld/
echo "Checking file checksum:"
md5sum $HOME/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/ld/libbtdm_app.a
- name: Run PlatformIO
run: platformio run
- name: Prepare Release Assets
run: |
sudo apt install rename
./scripts/prepare_deploy.sh
- name: Get upload url
id: release-id
run: |
RELEASE_ID=$(jq --raw-output '.release.id' $GITHUB_EVENT_PATH)
echo "::set-output name=upload_url::https://uploads.github.com/repos/${GITHUB_REPOSITORY}/releases/${RELEASE_ID}/assets{?name,label}"
- name: Upload Release Assets
uses: bgpat/release-asset-action@03b0c30db1c4031ce3474740b0e4275cd7e126a3
with:
pattern: "toDeploy/*"
github-token: ${{ secrets.GITHUB_TOKEN }}
release-url: ${{ steps.release-id.outputs.upload_url }}
allow-overwrite: true
call-workflow-passing-data:
needs: build-upload
uses: ./.github/workflows/manual_docs.yml