|
1 | | -name: 🚀 Custom Release Build |
2 | | - |
3 | | -on: |
4 | | - push: |
5 | | - tags: |
6 | | - - "v*-o*" # Matches tags like v1.8.0-o1, v1.8.1-o2, etc. |
7 | | - workflow_dispatch: |
8 | | - inputs: |
9 | | - version_type: |
10 | | - description: "Version bump type" |
11 | | - required: true |
12 | | - default: "patch" |
13 | | - type: choice |
14 | | - options: |
15 | | - - patch |
16 | | - - minor |
17 | | - - major |
18 | | - |
19 | | -env: |
20 | | - CUSTOM_SUFFIX: "o" |
21 | | - |
22 | | -jobs: |
23 | | - version-bump: |
24 | | - if: github.event_name == 'workflow_dispatch' |
25 | | - runs-on: ubuntu-latest |
26 | | - outputs: |
27 | | - new_version: ${{ steps.bump.outputs.new_version }} |
28 | | - steps: |
29 | | - - uses: actions/checkout@v4 |
30 | | - with: |
31 | | - token: ${{ secrets.GITHUB_TOKEN }} |
32 | | - fetch-depth: 0 |
33 | | - |
34 | | - - name: Setup PowerShell |
35 | | - shell: pwsh |
36 | | - run: | |
37 | | - # Install required modules if needed |
38 | | - Write-Host "PowerShell setup complete" |
39 | | -
|
40 | | - - name: Bump Version |
41 | | - id: bump |
42 | | - shell: pwsh |
43 | | - run: | |
44 | | - $newVersion = .\scripts\version-manager.ps1 ${{ github.event.inputs.version_type }} |
45 | | - echo "new_version=$newVersion" >> $env:GITHUB_OUTPUT |
46 | | -
|
47 | | - - name: Commit and Push |
48 | | - run: | |
49 | | - git config --local user.email "[email protected]" |
50 | | - git config --local user.name "GitHub Action" |
51 | | - git push origin HEAD:${{ github.ref_name }} |
52 | | -
|
53 | | - build: |
54 | | - needs: [version-bump] |
55 | | - if: always() && !cancelled() |
56 | | - runs-on: ubuntu-latest |
57 | | - strategy: |
58 | | - matrix: |
59 | | - environment: |
60 | | - - esp32dev-all-test |
61 | | - - esp32-theengs-bridge |
62 | | - - esp8266-rf |
63 | | - |
64 | | - steps: |
65 | | - - uses: actions/checkout@v4 |
66 | | - with: |
67 | | - fetch-depth: 0 |
68 | | - |
69 | | - - name: Cache pip |
70 | | - uses: actions/cache@v4 |
71 | | - with: |
72 | | - path: ~/.cache/pip |
73 | | - key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} |
74 | | - |
75 | | - - name: Cache PlatformIO |
76 | | - uses: actions/cache@v4 |
77 | | - with: |
78 | | - path: ~/.platformio |
79 | | - key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }} |
80 | | - |
81 | | - - name: Set up Python |
82 | | - uses: actions/setup-python@v5 |
83 | | - with: |
84 | | - python-version: "3.11" |
85 | | - |
86 | | - - name: Install PlatformIO |
87 | | - run: | |
88 | | - python -m pip install --upgrade pip |
89 | | - pip install --upgrade platformio |
90 | | -
|
91 | | - - name: Build firmware |
92 | | - run: pio run -e ${{ matrix.environment }} |
93 | | - |
94 | | - - name: Run tests |
95 | | - run: pio test -e test |
96 | | - |
97 | | - - name: Upload artifacts |
98 | | - uses: actions/upload-artifact@v4 |
99 | | - with: |
100 | | - name: firmware-${{ matrix.environment }} |
101 | | - path: .pio/build/${{ matrix.environment }}/firmware.* |
102 | | - |
103 | | - release: |
104 | | - needs: [build] |
105 | | - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') |
106 | | - runs-on: ubuntu-latest |
107 | | - steps: |
108 | | - - uses: actions/checkout@v4 |
109 | | - |
110 | | - - name: Download artifacts |
111 | | - uses: actions/download-artifact@v4 |
112 | | - with: |
113 | | - path: artifacts |
114 | | - |
115 | | - - name: Create Release |
116 | | - uses: softprops/action-gh-release@v1 |
117 | | - with: |
118 | | - files: artifacts/**/* |
119 | | - body: | |
120 | | - ## Custom OpenMQTTGateway Build ${{ github.ref_name }} |
121 | | -
|
122 | | - ### Features |
123 | | - - Custom RF signal filtering |
124 | | - - Enhanced BLE connectivity |
125 | | - - Optimized for specific hardware configurations |
126 | | -
|
127 | | - ### Changes |
128 | | - - Based on upstream OpenMQTTGateway |
129 | | - - Custom modifications for enhanced performance |
130 | | -
|
131 | | - ### Installation |
132 | | - 1. Download the appropriate firmware for your board |
133 | | - 2. Flash using your preferred method (OTA, esptool, etc.) |
134 | | -
|
135 | | - ### Support |
136 | | - For issues specific to these custom builds, please open an issue in this repository. |
137 | | - prerelease: ${{ contains(github.ref_name, '-rc') || contains(github.ref_name, '-beta') }} |
138 | | - env: |
139 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 1 | +name: 🚀 Custom Release Build |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + tags: |
| 6 | + - "v*-o*" # Matches tags like v1.8.0-o1, v1.8.1-o2, etc. |
| 7 | + workflow_dispatch: |
| 8 | + inputs: |
| 9 | + version_type: |
| 10 | + description: "Version bump type" |
| 11 | + required: true |
| 12 | + default: "patch" |
| 13 | + type: choice |
| 14 | + options: |
| 15 | + - patch |
| 16 | + - minor |
| 17 | + - major |
| 18 | + |
| 19 | +env: |
| 20 | + CUSTOM_SUFFIX: "o" |
| 21 | + |
| 22 | +jobs: |
| 23 | + version-bump: |
| 24 | + if: github.event_name == 'workflow_dispatch' |
| 25 | + runs-on: ubuntu-latest |
| 26 | + outputs: |
| 27 | + new_version: ${{ steps.bump.outputs.new_version }} |
| 28 | + steps: |
| 29 | + - uses: actions/checkout@v4 |
| 30 | + with: |
| 31 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 32 | + fetch-depth: 0 |
| 33 | + |
| 34 | + - name: Setup PowerShell |
| 35 | + shell: pwsh |
| 36 | + run: | |
| 37 | + # Install required modules if needed |
| 38 | + Write-Host "PowerShell setup complete" |
| 39 | +
|
| 40 | + - name: Bump Version |
| 41 | + id: bump |
| 42 | + shell: pwsh |
| 43 | + run: | |
| 44 | + $newVersion = .\scripts\version-manager.ps1 ${{ github.event.inputs.version_type }} |
| 45 | + echo "new_version=$newVersion" >> $env:GITHUB_OUTPUT |
| 46 | +
|
| 47 | + - name: Commit and Push |
| 48 | + run: | |
| 49 | + git config --local user.email "[email protected]" |
| 50 | + git config --local user.name "GitHub Action" |
| 51 | + git push origin HEAD:${{ github.ref_name }} |
| 52 | +
|
| 53 | + build: |
| 54 | + needs: [version-bump] |
| 55 | + if: always() && !cancelled() |
| 56 | + runs-on: ubuntu-latest |
| 57 | + strategy: |
| 58 | + matrix: |
| 59 | + environment: |
| 60 | + - esp32dev-all-test |
| 61 | + - esp32-theengs-bridge |
| 62 | + - esp8266-rf |
| 63 | + |
| 64 | + steps: |
| 65 | + - uses: actions/checkout@v4 |
| 66 | + with: |
| 67 | + fetch-depth: 0 |
| 68 | + |
| 69 | + - name: Cache pip |
| 70 | + uses: actions/cache@v4 |
| 71 | + with: |
| 72 | + path: ~/.cache/pip |
| 73 | + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} |
| 74 | + |
| 75 | + - name: Cache PlatformIO |
| 76 | + uses: actions/cache@v4 |
| 77 | + with: |
| 78 | + path: ~/.platformio |
| 79 | + key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }} |
| 80 | + |
| 81 | + - name: Set up Python |
| 82 | + uses: actions/setup-python@v5 |
| 83 | + with: |
| 84 | + python-version: "3.11" |
| 85 | + |
| 86 | + - name: Install PlatformIO |
| 87 | + run: | |
| 88 | + python -m pip install --upgrade pip |
| 89 | + pip install --upgrade platformio |
| 90 | +
|
| 91 | + - name: Build firmware |
| 92 | + run: pio run -e ${{ matrix.environment }} |
| 93 | + |
| 94 | + - name: Run tests |
| 95 | + run: pio test -e test |
| 96 | + |
| 97 | + - name: Upload artifacts |
| 98 | + uses: actions/upload-artifact@v4 |
| 99 | + with: |
| 100 | + name: firmware-${{ matrix.environment }} |
| 101 | + path: .pio/build/${{ matrix.environment }}/firmware.* |
| 102 | + |
| 103 | + release: |
| 104 | + needs: [build] |
| 105 | + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') |
| 106 | + runs-on: ubuntu-latest |
| 107 | + steps: |
| 108 | + - uses: actions/checkout@v4 |
| 109 | + |
| 110 | + - name: Download artifacts |
| 111 | + uses: actions/download-artifact@v4 |
| 112 | + with: |
| 113 | + path: artifacts |
| 114 | + |
| 115 | + - name: Create Release |
| 116 | + uses: softprops/action-gh-release@v1 |
| 117 | + with: |
| 118 | + files: artifacts/**/* |
| 119 | + body: | |
| 120 | + ## Custom OpenMQTTGateway Build ${{ github.ref_name }} |
| 121 | +
|
| 122 | + ### Features |
| 123 | + - Custom RF signal filtering |
| 124 | + - Enhanced BLE connectivity |
| 125 | + - Optimized for specific hardware configurations |
| 126 | +
|
| 127 | + ### Changes |
| 128 | + - Based on upstream OpenMQTTGateway |
| 129 | + - Custom modifications for enhanced performance |
| 130 | +
|
| 131 | + ### Installation |
| 132 | + 1. Download the appropriate firmware for your board |
| 133 | + 2. Flash using your preferred method (OTA, esptool, etc.) |
| 134 | +
|
| 135 | + ### Support |
| 136 | + For issues specific to these custom builds, please open an issue in this repository. |
| 137 | + prerelease: ${{ contains(github.ref_name, '-rc') || contains(github.ref_name, '-beta') }} |
| 138 | + env: |
| 139 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
0 commit comments