Skip to content

Commit

Permalink
Add GitHub release action workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
zargony committed Nov 4, 2024
1 parent 3eb4183 commit 9a90cf7
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 3 deletions.
33 changes: 31 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
paths:
- .github/workflows/ci.yaml
- "firmware/**"
workflow_dispatch:

env:
CARGO_TERM_COLOR: always
Expand Down Expand Up @@ -65,7 +66,8 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: touch-n-drink-elf
path: firmware/target/riscv32imc-unknown-none-elf/release/touch-n-drink
path: |
firmware/target/riscv32imc-unknown-none-elf/release/touch-n-drink
if-no-files-found: error

image:
Expand Down Expand Up @@ -97,5 +99,32 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: touch-n-drink-esp32c3
path: touch-n-drink-esp32c3*
path: |
touch-n-drink-esp32c3*
if-no-files-found: error

release:
name: Release
permissions:
contents: write
needs: [image]
if: github.repository == 'zargony/touch-n-drink' && startsWith(github.ref, 'refs/tags/firmware-')
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
sparse-checkout: |
firmware/CHANGELOG.md
- name: Download image artifact
uses: actions/download-artifact@v4
with:
name: touch-n-drink-esp32c3
- name: Release
uses: softprops/action-gh-release@v2
with:
body_path: firmware/CHANGELOG.md
draft: true
files: |
touch-n-drink*
fail_on_unmatched_files: true
2 changes: 1 addition & 1 deletion firmware/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Touch 'n Drink Firmware

Firmware images are automatically build by GitHub actions. They can be downloaded as artifacts of recent [CI][actions] runs <!-- eventually: on the [releases] page --> and flashed [from your browser][esptool-js]. The setup described below is only needed for local development.
Firmware images are automatically build by GitHub actions. They can be downloaded from the [releases] page and flashed [from your browser][esptool-js]. The setup described below is only needed for local development.

## Requirements

Expand Down

0 comments on commit 9a90cf7

Please sign in to comment.