-
-
Notifications
You must be signed in to change notification settings - Fork 0
94 lines (77 loc) · 2.68 KB
/
verify.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: Build and Verify Sketch
on:
push:
branches:
- main
tags:
- 'v*'
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Arduino CLI
uses: arduino/setup-arduino-cli@v2
- name: Install Arduino core
run: |
make install-core
- name: Install libraries
run: |
make install-libraries
- name: Compile Sketch
run: |
make verify
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: hex-files
path: ./build/*.hex
release:
runs-on: ubuntu-latest
needs: build
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: hex-files
path: ./hex-files # Specify extraction path
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
with:
tag_name: ${{ github.ref_name }}
release_name: ${{ github.ref_name }}
body: |
## Changes
- Description of changes in this release.
It is recommended and simple to build the firmware from source yourself by following the instructions in the README.
With `make upload` you can build and upload the firmware to your Arduino board just need arduino-cli installed.
Read instructions in [README](https://github.com/arvvoid/a500kybhid/blob/main/README.md#build-and-upload-guide) for more details.
With that said, binaries are provided here for convenience.
## Installation Instructions
To upload the hex file to your Arduino board, follow these steps:
1. Download the hex file from the release assets.
2. Use a tool like [avrdude](https://github.com/avrdudes/avrdude) to upload the hex file to your board.
3. Example command for Arduino Leonardo:
```
avrdude -v -patmega32u4 -cavr109 -P/dev/ttyACM0 -b57600 -D -Uflash:w:a500kybhid.hex:i
```
4. Replace `/dev/ttyACM0` with the appropriate port for your system.
draft: false
prerelease: true
- name: Upload Release Assets
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./hex-files/a500kybhid.ino.hex
asset_name: a500kybhid.hex
asset_content_type: application/octet-stream