Update build_esp32_s3.yml #137
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
# # Triggers the workflow on push for all branches | |
push: | |
# branches: [master, ci-changes] | |
branches: | |
- "**" | |
paths-ignore: | |
- "**.md" | |
- "version.properties" | |
tags: | |
- v* | |
workflow_dispatch: | |
jobs: | |
build-esp32: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- board: esp32dev-sa818-868 | |
- board: esp32dev-t-twr-mod | |
uses: ./.github/workflows/build_esp32.yml | |
with: | |
board: ${{ matrix.board }} | |
build-esp32-s3: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- board: lilygo-t-twr-plus | |
- board: lilygo-t-twr-v1 | |
uses: ./.github/workflows/build_esp32_s3.yml | |
with: | |
board: ${{ matrix.board }} | |
build-native: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build base | |
id: base | |
uses: ./.github/actions/setup-base | |
- name: Build Native | |
run: bin/build-native.sh | |
- name: Get release version string | |
run: echo "version=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT | |
id: version | |
- name: Store binaries as an artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: firmware-native-${{ steps.version.outputs.version }}.zip | |
path: | | |
release/device-*.sh | |
release/device-*.bat | |
gather-artifacts: | |
runs-on: ubuntu-latest | |
needs: | |
[build-esp32, build-esp32-s3, build-native] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{github.event.pull_request.head.ref}} | |
repository: ${{github.event.pull_request.head.repo.full_name}} | |
- uses: actions/download-artifact@v4 | |
with: | |
path: ./ | |
- name: Get release version string | |
run: echo "version=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT | |
id: version | |
- name: Move files up | |
run: mv -b -t ./ ./**/firmware*.bin ./*native*/*device-*.sh ./*native*/*device-*.bat | |
- name: Repackage in single firmware zip | |
uses: actions/upload-artifact@v4 | |
with: | |
name: firmware-${{ steps.version.outputs.version }} | |
path: | | |
./*.bin | |
./device-*.sh | |
./device-*.bat | |
retention-days: 5 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: firmware-${{ steps.version.outputs.version }} | |
path: ./output | |
# For diagnostics | |
- name: Show artifacts | |
run: ls -lR | |
- name: Device scripts permissions | |
run: | | |
chmod +x ./output/device-install.sh | |
chmod +x ./output/device-update.sh | |
- name: Zip firmware | |
run: zip -j -9 -r ./firmware-${{ steps.version.outputs.version }}.zip ./output | |
- name: Create request artifacts | |
if: ${{ github.event_name == 'pull_request_target' || github.event_name == 'pull_request' }} | |
uses: gavv/pull-request-artifacts@v1.0.0 | |
with: | |
commit: ${{ (github.event.pull_request_target || github.event.pull_request).head.sha }} | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
artifacts-token: ${{ secrets.ARTIFACTS_TOKEN }} | |
artifacts-repo: APRS-ESP/artifacts | |
artifacts-branch: device | |
artifacts-dir: pr | |
artifacts: ./firmware-${{ steps.version.outputs.version }}.zip | |
release-artifacts: | |
runs-on: ubuntu-latest | |
if: startsWith(github.event.ref, 'refs/tags/v') | |
needs: [gather-artifacts] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.x | |
- name: Get release version string | |
run: echo "version=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT | |
id: version | |
- name: Get short release version string | |
run: echo "short_version=$(./bin/buildinfo.py short)" >> $GITHUB_OUTPUT | |
id: short_version | |
- uses: actions/download-artifact@v4 | |
with: | |
name: firmware-${{ steps.version.outputs.version }} | |
path: ./output | |
- name: Device scripts permissions | |
run: | | |
chmod +x ./output/device-install.sh | |
chmod +x ./output/device-update.sh | |
- name: Zip firmware | |
run: zip -j -9 -r ./firmware-${{ steps.version.outputs.version }}.zip ./output | |
# For diagnostics | |
- name: Show artifacts | |
run: ls -lR | |
- name: Create release | |
uses: actions/create-release@v1 | |
id: create_release | |
with: | |
draft: true | |
prerelease: true | |
release_name: APRS-ESP Firmware ${{ steps.short_version.outputs.short_version }} | |
tag_name: v${{ steps.version.outputs.version }} | |
body: | | |
Autogenerated by github action, developer should edit as required before publishing... | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
- name: Add bins to release | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./firmware-${{ steps.version.outputs.version }}.zip | |
asset_name: aprsesp-firmware-${{ steps.version.outputs.version }}.zip | |
asset_content_type: application/zip | |
# - name: Bump version.properties | |
# run: >- | |
# bin/bump_version.py | |
# - name: Create version.properties pull request | |
# uses: peter-evans/create-pull-request@v3 | |
# with: | |
# add-paths: | | |
# version.properties |