-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (57 loc) · 1.81 KB
/
main.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
name: PlatformIO CI
on:
workflow_dispatch:
#push:
# branches: [ "main" ]
jobs:
build:
permissions:
contents: 'write'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cache/pip
~/.platformio/.cache
key: ${{ runner.os }}-pio
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install PlatformIO Core
run: pip install --upgrade platformio
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.github_token }}
- name: Generate version
run: python utils/write-version.py ${{ steps.tag_version.outputs.new_tag }}
- name: Build PlatformIO Project
run: pio run -t mergebin
env:
MERGED_BIN_PATH: ./hd2_macropad.bin
IDF_MAINTAINER: y
- name: Pack assets
run: python utils/pack-assets.py
- name: Upload binary to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.github_token }}
file: ./hd2_macropad.bin
asset_name: hd2_macropad.bin
tag: ${{ steps.tag_version.outputs.new_tag }}
overwrite: true
prerelease: true
body: ${{ steps.tag_version.outputs.changelog }}
- name: Upload assets to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.github_token }}
file: ./assets.zip
asset_name: assets.zip
tag: ${{ steps.tag_version.outputs.new_tag }}
overwrite: true
prerelease: true
body: ${{ steps.tag_version.outputs.changelog }}