vedatbotuk / zigbee-with-esp32h2

GNU General Public License v3.0
0 stars 0 forks source link

upload automatic ota file, when merged to main #47

Open vedatbotuk opened 3 hours ago

vedatbotuk commented 3 hours ago

upload-binary.yml

name: Build and Upload Binary

on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
    # Checkout the repository
    - name: Checkout repository
      uses: actions/checkout@v4

    # Run your build step here (example: compiling a Go project)
    - name: Build project
      run: |
        make build # adjust to your build command
        ls -la # list files to ensure the binary exists

    # Upload the binary back to the main branch
    - name: Upload binary
      run: |
        git config --local user.name "GitHub Actions"
        git config --local user.email "actions@github.com"
        git add path/to/your/binary
        git commit -m "Add binary"
        git push origin main
vedatbotuk commented 3 hours ago

Add upload section above to build_main.yml