1
0
Fork 0

Update CI to create github releases

This commit is contained in:
KemoNine 2022-01-12 19:31:43 -05:00
parent 13459a8929
commit a600af3e9a
2 changed files with 41 additions and 1 deletions

View file

@ -121,3 +121,43 @@ jobs:
${{ matrix.shield }}-${{ matrix.board }}-zmk-artsey.hex ${{ matrix.shield }}-${{ matrix.board }}-zmk-artsey.hex
${{ matrix.shield }}-${{ matrix.board }}-zmk-artsey.uf2 ${{ matrix.shield }}-${{ matrix.board }}-zmk-artsey.uf2
continue-on-error: true continue-on-error: true
release:
runs-on: ubuntu-latest
name: Create Release
needs: build
steps:
- name: Get current date/time
id: date
run: echo "::set-output name=date::$(date +'%Y%m%d-%H%M')"
- name: Generate release text
id: release_text
run: >
echo "::set-output name=release_text::$(echo '<b>Precompiled firmware files for ARTSEY</b><br><br>
Download a firmware file by expanding "Assets", right clicking, and choosing "Save File As" or "Save Link As".
<br>${{ github.event.inputs.releaseBody }}
<br>Released on ${{ steps.date.outputs.date }}.
<br><br>${{ steps.docker_build.outputs.commits }}')"
- name: Download build artifacts for release
uses: actions/download-artifact@v2
with:
path: release
- name: List files to include in release
if: always()
run: ls -R release/
- name: Create zip files directory for individual board assets
if: always()
run: mkdir zips
- name: Zip all firmware files for release
if: always()
run: cd release && for folder in ./*; do echo $folder; zip -r ../zips/${folder}.zip ${folder}/; done && cd ..
- name: Create release
uses: ncipollo/release-action@v1
with:
artifacts: "zips/*"
allowUpdates: false
artifactErrorsFailBuild: true
commit: main
tag: ${{ steps.date.outputs.date }}
body: ${{ steps.release_text.outputs.release_text }}
name: ${{ steps.date.outputs.date }}
token: ${{ secrets.GITHUB_TOKEN }}

View file

@ -4,7 +4,7 @@ This repo contains the [ZMK](https://zmkfirmware.dev/) ARTSEY implementation and
## Prebuilt Firmware ## Prebuilt Firmware
The `Actions` tab of this repository contains the latest builds of the ZMK ARTSEY implementation. You can click on the most recent build and download the appropriate artifact for your MCU + board combination. Inside the zip file will be the necessary file for flashing your MCU. The `Releases` area of this repository contains the latest builds of the ZMK ARTSEY implementation. You can click on the most recent release and download the appropriate artifact for your MCU + board combination. Inside the zip file will be the necessary file for flashing your MCU.
### Firmware Files ### Firmware Files