Merge pull request #230 from whywilson/main #217
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Push handler | |
on: | |
push: | |
jobs: | |
firmware_pipeline: | |
name: Build Firmware | |
permissions: | |
packages: write | |
contents: read | |
uses: ./.github/workflows/build_firmware.yml | |
client_pipeline: | |
name: Build Firmware | |
uses: ./.github/workflows/build_client.yml | |
create_dev_release: | |
permissions: | |
contents: write | |
name: Create dev pre-release with artifacts | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/main' | |
needs: | |
- firmware_pipeline | |
- client_pipeline | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v3 | |
- name: Download release artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: release-artifacts | |
path: release-artifacts | |
- name: Upload to dev release | |
uses: softprops/action-gh-release@v1 | |
with: | |
body: | | |
Auto-Generated DFU packages from latest `main` commit. | |
For development purposes only. | |
These are not tested, here be dragons. | |
Built from commit ${{ github.sha }} | |
tag_name: dev | |
name: Development release | |
draft: false | |
prerelease: true | |
target_commitish: ${{ github.sha }} | |
generate_release_notes: true | |
files: release-artifacts/* | |
- name: Fix up release tag | |
run: | | |
git tag -f dev | |
git push --tags -f | |
create_release: | |
permissions: | |
contents: write | |
name: Create tagged release with artifacts | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/v') | |
needs: | |
- firmware_pipeline | |
- client_pipeline | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v3 | |
- name: Download release artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: release-artifacts | |
path: release-artifacts | |
- name: Upload to tagged release | |
uses: softprops/action-gh-release@v1 | |
with: | |
body: | | |
Auto-Generated DFU packages for Release ${{ github.ref_name }} | |
Built from commit ${{ github.sha }} | |
name: Release ${{ github.ref_name }} | |
draft: false | |
target_commitish: ${{ github.sha }} | |
generate_release_notes: true | |
append_body: true | |
files: release-artifacts/* |