-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (70 loc) · 1.88 KB
/
build.yml
File metadata and controls
83 lines (70 loc) · 1.88 KB
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
name: ESP-IDF Build
on:
push:
branches: [main]
tags: ["*"]
permissions:
contents: write
issues: write
pull-requests: write
env:
IDF_PATH: "/opt/esp/idf"
jobs:
build:
name: Build ESP32
runs-on: ubuntu-latest
container:
image: espressif/idf:release-v5.5
defaults:
run:
shell: bash
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Fix git ownership
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Restore cache
uses: actions/cache@v4
with:
path: |
build/
key: esp-idf-cache-${{ hashFiles('**/CMakeLists.txt', '**/sdkconfig', '**/sdkconfig.defaults') }}
restore-keys: |
esp-idf-cache-
- name: Build firmware
run: |
. $IDF_PATH/export.sh
idf.py build
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: firmware
path: |
build/*.elf
build/*.bin
build/*.map
package:
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: firmware
path: build/
- name: Install semantic-release and plugins
run: npm install -g semantic-release @semantic-release/changelog @semantic-release/git @semantic-release/github
- name: Run semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: semantic-release