Skip to content

Commit 399facf

Browse files
committed
workflows: Add Vendor Build and Release CI workflows
This commit introduces two new GitHub Actions workflows: 1. `build.vendor.yml` for building firmware for specified boards. 2. `release.vendor.yml` for managing the release process, including versioning and artifact publishing. These workflows enhance the CI/CD capabilities for the project, ensuring streamlined builds and releases. Signed-off-by: Chiho Sin <[email protected]>
1 parent 00f53e1 commit 399facf

File tree

3 files changed

+42
-36
lines changed

3 files changed

+42
-36
lines changed
Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build CI
1+
name: Vendor Build CI
22

33
on:
44
workflow_call:
@@ -51,16 +51,7 @@ jobs:
5151
sudo mv bin ${{ inputs.board }}
5252
tar -cJf ${{ inputs.board }}${{ inputs.firmware_tag }}.tar.xz ${{ inputs.board }}
5353
54-
- name: Upload binaries to release
55-
if: ${{ inputs.release_tag != '' }}
56-
uses: softprops/action-gh-release@v2
57-
with:
58-
tag_name: ${{ inputs.release_tag }}
59-
files: ${{ inputs.board }}${{ inputs.firmware_tag }}.tar.xz
60-
token: ${{ secrets.GITHUB_TOKEN }}
61-
6254
- name: Store binaries as an artifact
63-
if: ${{ inputs.release_tag == '' }}
6455
uses: actions/upload-artifact@v4
6556
with:
6657
name: ${{ inputs.board }}${{ inputs.firmware_tag }}

.github/workflows/fobe_sync.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.
Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ jobs:
266266
strategy:
267267
fail-fast: false
268268
matrix: ${{ fromJSON(needs.setup.outputs.esp32) }}
269-
uses: ./.github/workflows/fobe_build.yml
269+
uses: ./.github/workflows/build.vendor.yml
270270
with:
271271
repo_remote: origin
272272
repo_ref: ${{ github.sha }}
@@ -283,7 +283,7 @@ jobs:
283283
strategy:
284284
fail-fast: false
285285
matrix: ${{ fromJSON(needs.setup.outputs.nrf) }}
286-
uses: ./.github/workflows/fobe_build.yml
286+
uses: ./.github/workflows/build.vendor.yml
287287
with:
288288
repo_remote: origin
289289
repo_ref: ${{ github.sha }}
@@ -292,3 +292,42 @@ jobs:
292292
firmware_tag: ${{ needs.create-release.outputs.firmware_tag }}
293293
release_tag: ${{ needs.create-release.outputs.release_tag }}
294294
secrets: inherit
295+
296+
publish:
297+
runs-on: ubuntu-latest
298+
needs: [create-release, build-esp32, build-nrf]
299+
steps:
300+
- name: Checkout
301+
uses: actions/checkout@v5
302+
303+
- name: Setup Python
304+
uses: actions/setup-python@v6
305+
with:
306+
python-version: 3.x
307+
308+
- uses: actions/download-artifact@v5
309+
with:
310+
merge-multiple: true
311+
path: ./publish
312+
313+
- name: Upload binaries to release
314+
if: ${{ needs.create-release.outputs.release_tag != '' }}
315+
uses: softprops/action-gh-release@v2
316+
with:
317+
tag_name: ${{ needs.create-release.outputs.release_tag }}
318+
files: ./publish/*
319+
token: ${{ secrets.GITHUB_TOKEN }}
320+
321+
- name: Publish firmware to fobe-projects.github.io
322+
uses: peaceiris/actions-gh-pages@v4
323+
with:
324+
deploy_key: ${{ secrets.FOBE_ARTIFACT_PAGES_DEPLOY_KEY }}
325+
external_repository: fobe-projects/fobe-projects.github.io
326+
publish_branch: main
327+
publish_dir: ./publish
328+
destination_dir: firmwares/micropython/${{ needs.create-release.outputs.release_tag }}
329+
keep_files: true
330+
user_name: github-actions[bot]
331+
user_email: github-actions[bot]@users.noreply.github.com
332+
commit_message: ${{ needs.create-release.outputs.release_tag }}
333+
enable_jekyll: true

0 commit comments

Comments
 (0)