Skip to content

Commit

Permalink
Add releases deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
Sgw32 committed Oct 6, 2024
1 parent 5288d69 commit e665c0d
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/deploy_releases.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Deploy Releases

# Trigger the workflow on pushes to tags matching 'v*.*.*'
on:
push:
tags:
- 'v*.*.*'

jobs:
build-and-deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
submodules: 'recursive'

- name: Set up ESP-IDF and Build
uses: espressif/esp-idf-ci-action@v1.1.0
with:
esp_idf_version: v5.2.1
target: esp32s3
path: 'ESP32/Digifiz/'

- name: Collect Build Artifacts
uses: actions/upload-artifact@v3
with:
name: firmware
path: |
ESP32/Digifiz/build/*.bin
ESP32/Digifiz/build/*.elf
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
Automated release for `${{ github.ref }}`.
draft: false
prerelease: false

- name: Upload Firmware to Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./ESP32/Digifiz/build/your_firmware.bin
asset_name: your_firmware.bin
asset_content_type: application/octet-stream

- name: Upload ELF to Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./ESP32/Digifiz/build/your_firmware.elf
asset_name: your_firmware.elf
asset_content_type: application/octet-stream

0 comments on commit e665c0d

Please sign in to comment.