Skip to content

Commit edb8ae8

Browse files
committed
workflows: add build and release CI workflows
This commit introduces two new GitHub Actions workflows: `build.vendor.yml` for building firmware for specified boards and `release.vendor.yml` for managing the release process, including version determination and artifact publishing. Signed-off-by: Chiho Sin <[email protected]>
1 parent af54bad commit edb8ae8

File tree

2 files changed

+44
-13
lines changed

2 files changed

+44
-13
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 }}
Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Release CI
1+
name: Vendor Release CI
22

33
permissions:
44
contents: write
@@ -228,7 +228,7 @@ jobs:
228228
strategy:
229229
fail-fast: false
230230
matrix: ${{ fromJSON(needs.setup.outputs.espressif) }}
231-
uses: ./.github/workflows/fobe_build.yml
231+
uses: ./.github/workflows/build.vendor.yml
232232
with:
233233
repo_remote: origin
234234
repo_ref: ${{ github.sha }}
@@ -245,7 +245,7 @@ jobs:
245245
strategy:
246246
fail-fast: false
247247
matrix: ${{ fromJSON(needs.setup.outputs.nordic) }}
248-
uses: ./.github/workflows/fobe_build.yml
248+
uses: ./.github/workflows/build.vendor.yml
249249
with:
250250
repo_remote: origin
251251
repo_ref: ${{ github.sha }}
@@ -254,3 +254,43 @@ jobs:
254254
firmware_tag: ${{ needs.create-release.outputs.firmware_tag }}
255255
release_tag: ${{ needs.create-release.outputs.release_tag }}
256256
secrets: inherit
257+
258+
publish:
259+
name: Publish Artifacts
260+
runs-on: ubuntu-latest
261+
needs: [create-release, build-espressif, build-nordic]
262+
steps:
263+
- name: Checkout
264+
uses: actions/checkout@v5
265+
266+
- name: Setup Python
267+
uses: actions/setup-python@v6
268+
with:
269+
python-version: 3.x
270+
271+
- uses: actions/download-artifact@v5
272+
with:
273+
merge-multiple: true
274+
path: ./publish
275+
276+
- name: Upload binaries to release
277+
if: ${{ needs.create-release.outputs.release_tag != '' }}
278+
uses: softprops/action-gh-release@v2
279+
with:
280+
tag_name: ${{ needs.create-release.outputs.release_tag }}
281+
files: ./publish/*
282+
token: ${{ secrets.GITHUB_TOKEN }}
283+
284+
- name: Publish firmware to fobe-projects.github.io
285+
uses: peaceiris/actions-gh-pages@v4
286+
with:
287+
deploy_key: ${{ secrets.FOBE_ARTIFACT_PAGES_DEPLOY_KEY }}
288+
external_repository: fobe-projects/fobe-projects.github.io
289+
publish_branch: main
290+
publish_dir: ./publish
291+
destination_dir: firmwares/circuitpython/${{ needs.create-release.outputs.release_tag }}
292+
keep_files: true
293+
user_name: github-actions[bot]
294+
user_email: github-actions[bot]@users.noreply.github.com
295+
commit_message: circuitpython/${{ needs.create-release.outputs.release_tag }}
296+
enable_jekyll: true

0 commit comments

Comments
 (0)