diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 91e2cbe..eb8d98a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -3,11 +3,11 @@ on: push: paths: - .github/workflows/ci.yaml - - 'firmware/**' + - "firmware/**" pull_request: paths: - .github/workflows/ci.yaml - - 'firmware/**' + - "firmware/**" env: CARGO_TERM_COLOR: always diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..52f19e5 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,39 @@ +name: Release +on: + push: + # tags: + # - "firmware-[0-9]+.[0-9]+.[0-9]+" + # - "firmware-[0-9]+.[0-9]+.[0-9]+-*" + branches: + - release-action + +permissions: + contents: write + +jobs: + wait_for_ci: + name: Wait for CI Workflow + runs-on: ubuntu-latest + steps: + - name: Wait for CI + uses: lewagon/wait-on-check-action@v1.3.4 + with: + ref: ${{ github.ref }} + check-name: Image + repo-token: ${{ secrets.GITHUB_TOKEN }} + + release: + name: Release + needs: [wait_for_ci] + runs-on: ubuntu-latest + steps: + - 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*.bin diff --git a/firmware/README.md b/firmware/README.md index 3b4b93c..ffd514c 100644 --- a/firmware/README.md +++ b/firmware/README.md @@ -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 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