Removed hardware version info #41
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: Build, test, upload | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
workflow_dispatch: | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
jobs: | |
build: | |
runs-on: [ubuntu-latest] | |
env: | |
APP_NAME: fdskey | |
OUT_DIR: fdskey | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install compiler | |
run: sudo apt-get install gcc-arm-none-eabi | |
- name: Build bootloader | |
run: | | |
mkdir -p ${{ env.OUT_DIR }} | |
make -C FdsKey_bootloader/interim/ OBJCOPY_BIN=../../${{ env.OUT_DIR }}/${{ env.APP_NAME }}_bootloader.bin EXECUTABLES=../../${{ env.OUT_DIR }}/${{ env.APP_NAME }}_bootloader.elf | |
- name: Build firmware | |
run: | | |
mkdir -p ${{ env.OUT_DIR }} | |
make -C FdsKey/interim/ OBJCOPY_BIN=../../${{ env.OUT_DIR }}/${{ env.APP_NAME }}.bin EXECUTABLES=../../${{ env.OUT_DIR }}/${{ env.APP_NAME }}.elf | |
- name: Archive | |
working-directory: ${{ env.OUT_DIR }} | |
run: | | |
tar -czvf ../${{ env.APP_NAME }}.tar.gz * | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.APP_NAME }} | |
path: ${{ env.OUT_DIR }} | |
upload-to-pages: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v3 | |
- name: Move files to the root | |
run: find -mindepth 2 -exec mv {} . \; | |
- name: Generate index.html | |
run: "(echo \"<html><head><title>FDSKey</title></head><meta http-equiv='Cache-Control' content='no-cache, no-store, must-revalidate'/><body>Updated: `date`<br/><br/>Main firmware (.bin): <a href='fdskey.bin'>fdskey.bin</a><br/><small>(MD5: `md5sum fdskey.bin | awk '{print $1}'`)</small></br>Put <b>fdskey.bin</b> file on a microSD card and hold all four buttons during power-on to update the firmware.<br/><br/>Main firmware (.elf): <a href='fdskey.elf'>fdskey.elf</a><br/><small>(MD5: `md5sum fdskey.elf | awk '{print $1}'`)</small></br>Use this file to write firmware using programmer.</br></br>Bootloader (.bin): <a href='fdskey_bootloader.bin'>fdskey_bootloader.bin</a><br/><small>(MD5: `md5sum fdskey_bootloader.bin | awk '{print $1}'`)</small></br>It's just bootloader as raw binary file.</br></br>Bootloader (.elf): <a href='fdskey_bootloader.elf'>fdskey_bootloader.elf</a><br/><small>(MD5: `md5sum fdskey_bootloader.elf | awk '{print $1}'`)</small></br>Use this file to write bootloader using programmer.</body></html>\") > index.html" | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: '.' | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v1 |