Skip to content

Commit

Permalink
CI: create release on tag push #12
Browse files Browse the repository at this point in the history
  • Loading branch information
jschroeter committed Jun 22, 2024
1 parent 5b6d483 commit 88561db
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/firmware.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,27 @@ jobs:
./firmware/esp32/gdoor/.pio/build/GDOOR_ESP32MINI/*.bin
./firmware/esp32/gdoor/.pio/build/GDOOR_ESP32MINI/web
# on main branch: push firmware to web installer
release:
if: startsWith(github.ref, 'refs/tags/v') && !endsWith(github.ref, '-hardware')
runs-on: ubuntu-latest
needs: build
steps:
- name: Download production artifacts
uses: actions/download-artifact@v4
with:
name: gdoor_firmware

- name: Create release
uses: softprops/action-gh-release@v2
with:
files: ./*.bin

- name: Push firmware to website repo for web installer
if: github.ref == 'refs/heads/main'
uses: cpina/github-action-push-to-another-repository@main
env:
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
with:
source-directory: './firmware/esp32/gdoor/.pio/build/GDOOR_ESP32MINI/web'
source-directory: './web'
target-directory: 'assets/firmware'
destination-github-username: 'gdoor-org'
destination-repository-name: 'gdoor-org.github.io'
Expand Down

0 comments on commit 88561db

Please sign in to comment.