Skip to content

Update actions/configure-pages action to v4 #53

Update actions/configure-pages action to v4

Update actions/configure-pages action to v4 #53

Workflow file for this run

name: build-release
env:
GH_TOKEN: ${{ secrets.GH_PAT }}
on:
workflow_dispatch:
inputs:
release-version:
type: string
description: Firmware Version
default: 'vX.X.X'
required: true
release-type:
type: choice
description: Production or Development?
options:
- 'production'
- 'development'
- 'build only'
default: 'development'
pull_request:
jobs:
build-esp32s3:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache pip and platformio
uses: actions/cache@v3
with:
path: |
~/.cache/pip
~/.platformio/.cache
key: ${{ runner.os }}-pio
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install PlatformIO
run: pip install --upgrade platformio
- name: Set version var
run: echo "PLATFORMIO_BUILD_FLAGS=-DFW_VERSION='\"${{ inputs.release-version }}\"' -DREPO_PATH='\"$GITHUB_REPOSITORY\"'" >> $GITHUB_ENV
if: github.event_name == 'workflow_dispatch'
- name: Setup git for private libraries
run: gh auth setup-git
- name: Run PlatformIO
run: pio run -e esp32-s3-devkitc-1
- name: Rename firmware
run: cp .pio/build/esp32-s3-devkitc-1/firmware.bin esp32s3.bin
- name: Cache Build
if: github.event_name == 'workflow_dispatch'
uses: actions/cache@v3
with:
path: 'esp32s3.bin'
key: ${{ runner.os }}-${{ github.run_id }}
archive-esp32s3:
needs: build-esp32s3
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Get Cached Build
if: github.event_name == 'workflow_dispatch'
uses: actions/cache@v3
with:
path: 'esp32s3.bin'
key: ${{ runner.os }}-${{ github.run_id }}
- name: Archive Build
uses: actions/upload-artifact@v3
with:
name: 'build'
path: 'esp32s3.bin'
release:
needs:
- build-esp32s3
if: (github.event_name == 'workflow_dispatch' && inputs.release-type != 'build only')
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Get Cached Build
if: github.event_name == 'workflow_dispatch'
uses: actions/cache@v3
with:
path: 'esp32s3.bin'
key: ${{ runner.os }}-${{ github.run_id }}
- name: Development Release
uses: ncipollo/release-action@v1
if: inputs.release-type == 'development'
with:
artifacts: '*.bin'
generateReleaseNotes: true
tag: ${{ inputs.release-version }}
token: ${{ secrets.GITHUB_TOKEN }}
prerelease: true
makeLatest: false
- name: Production Release
uses: ncipollo/release-action@v1
if: inputs.release-type == 'production'
with:
artifacts: '*.bin'
generateReleaseNotes: true
tag: ${{ inputs.release-version }}
token: ${{ secrets.GITHUB_TOKEN }}