-
Notifications
You must be signed in to change notification settings - Fork 0
111 lines (86 loc) · 3.43 KB
/
release.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
name: Create Release
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
jobs:
build:
env:
commitmsg: ${{ github.event.head_commit.message }}
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install platformio
python --version
- name: Install submodules
run: |
git submodule update --init
- name: Setup template config files
run: |
cp /home/runner/work/smart_watch_winder/smart_watch_winder/secrets.ini.template /home/runner/work/smart_watch_winder/smart_watch_winder/secrets.ini
- name: Static code analysis
run: platformio check --verbose --severity=high --skip-packages
- name: Run PlatformIO (watchwinder_1)
run: platformio run -e watchwinder_1
- name: Save artifact (watchwinder_1)
run: |
mkdir esp8266_firmware;
cp .pio/build/watchwinder_1/firmware.bin esp8266_firmware/WatchWinder_1_ESP8266_firmware.bin
- name: Run PlatformIO (watchwinder_2)
run: platformio run -e watchwinder_2
- name: Save artifact (watchwinder_2)
run: |
cp .pio/build/watchwinder_2/firmware.bin esp8266_firmware/WatchWinder_2_ESP8266_firmware.bin
- name: Run PlatformIO (watchwinder_3)
run: platformio run -e watchwinder_3
- name: Save artifact (watchwinder_3)
run: |
cp .pio/build/watchwinder_3/firmware.bin esp8266_firmware/WatchWinder_3_ESP8266_firmware.bin
- name: Run PlatformIO (watchwinder_4)
run: platformio run -e watchwinder_4
- name: Save artifact (watchwinder_4)
run: |
cp .pio/build/watchwinder_4/firmware.bin esp8266_firmware/WatchWinder_4_ESP8266_firmware.bin
- name: Run PlatformIO (watchwinder_5)
run: platformio run -e watchwinder_5
- name: Save artifact (watchwinder_5)
run: |
cp .pio/build/watchwinder_5/firmware.bin esp8266_firmware/WatchWinder_5_ESP8266_firmware.bin
- name: Run PlatformIO (watchwinder_6)
run: platformio run -e watchwinder_6
- name: Save artifact (watchwinder_6)
run: |
cp .pio/build/watchwinder_6/firmware.bin esp8266_firmware/WatchWinder_6_ESP8266_firmware.bin
- name: get commit message
run: |
echo Commit MSG = $commitmsg
- name: Creating tar file
run: |
tar cf WatchWinder_esp8266_firmware.tar esp8266_firmware
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ github.ref }}
name: Release ${{ github.ref_name }}
body: |
Changes in this Release
${{ env.commitmsg }}
draft: false
prerelease: false
- name: Release files
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: WatchWinder_esp8266_firmware.tar