Skip to content

Commit 08c6087

Browse files
Ian MatsonIan Matson
authored andcommitted
2 parents a6727a0 + a871494 commit 08c6087

File tree

10 files changed

+454
-168
lines changed

10 files changed

+454
-168
lines changed

.github/FUNDING.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# These are supported funding model platforms
2+
3+
github: [elliotmatson]

.github/workflows/build-release.yml

Lines changed: 57 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,15 @@ on:
55
release-version:
66
type: string
77
description: Firmware Version
8-
default: 'v0.0.0'
8+
default: 'vX.X.X'
99
required: true
10+
release-type:
11+
type: choice
12+
description: Production or Development?
13+
options:
14+
- production
15+
- development
16+
default: 'development'
1017
pull_request:
1118

1219
jobs:
@@ -43,15 +50,58 @@ jobs:
4350
run: pio run -e esp-wrover-kit
4451
- name: Rename firmware
4552
run: cp .pio/build/esp-wrover-kit/firmware.bin esp32.bin
46-
- name: Release
47-
uses: ncipollo/release-action@v1
53+
- name: Cache Build
54+
if: github.event_name == 'workflow_dispatch'
55+
uses: actions/cache@v3
56+
with:
57+
path: 'esp32.bin'
58+
key: ${{ runner.os }}-${{ github.run_id }}
59+
60+
archive:
61+
needs: build
62+
runs-on: ubuntu-latest
63+
permissions:
64+
contents: write
65+
steps:
66+
- name: Get Cached Build
4867
if: github.event_name == 'workflow_dispatch'
68+
uses: actions/cache@v3
4969
with:
50-
artifacts: "*.bin"
70+
path: 'esp32.bin'
71+
key: ${{ runner.os }}-${{ github.run_id }}
72+
- name: Archive Build
73+
uses: actions/upload-artifact@v3
74+
with:
75+
path: 'esp32.bin'
76+
77+
release:
78+
needs: build
79+
if: github.event_name == 'workflow_dispatch'
80+
runs-on: ubuntu-latest
81+
permissions:
82+
contents: write
83+
steps:
84+
- name: Get Cached Build
85+
if: github.event_name == 'workflow_dispatch'
86+
uses: actions/cache@v3
87+
with:
88+
path: 'esp32.bin'
89+
key: ${{ runner.os }}-${{ github.run_id }}
90+
- name: Development Release
91+
uses: ncipollo/release-action@v1
92+
if: inputs.release-type == 'development'
93+
with:
94+
artifacts: '*.bin'
5195
generateReleaseNotes: true
5296
tag: ${{ inputs.release-version }}
5397
token: ${{ secrets.GITHUB_TOKEN }}
54-
- name: Archive Build
55-
uses: actions/upload-artifact@v3
98+
prerelease: true
99+
makeLatest: false
100+
- name: Production Release
101+
uses: ncipollo/release-action@v1
102+
if: inputs.release-type == 'production'
56103
with:
57-
path: "*.bin"
104+
artifacts: '*.bin'
105+
generateReleaseNotes: true
106+
tag: ${{ inputs.release-version }}
107+
token: ${{ secrets.GITHUB_TOKEN }}

lib/cube/config.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
#ifndef CONFIG_H
22
#define CONFIG_H
33

4-
// Uncomment to switch from DEV mode to GHA updates
5-
//#define FW_VERSION "v0.0.0"
6-
74
// SW Version (Github Actions automatically sets this)
85
#ifndef FW_VERSION
96
#define FW_VERSION "DEV"
10-
#define DEVELOPMENT
117
#endif
128

139
// Repo for automatic updates (Github Actions automatically sets this)

0 commit comments

Comments
 (0)