Skip to content

Commit dabf9d2

Browse files
committed
SWPROT-8953: ci: github: Add rootfs action
Origin: SiliconLabs/UnifySDK#50 Forwarded: #5 Signed-off-by: Philippe Coval <philippe.coval@silabs.com>
1 parent af2818d commit dabf9d2

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/build-rootfs.yml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# YAML -*- mode: yaml; tab-width: 2; indent-tabs-mode: nil; coding: utf-8 -*-
2+
---
3+
name: Build in rootfs for arch
4+
5+
on: # yamllint disable-line rule:truthy
6+
push:
7+
tags:
8+
- '*'
9+
jobs:
10+
build:
11+
runs-on: ubuntu-24.04
12+
strategy:
13+
matrix:
14+
arch:
15+
- amd64
16+
- arm64
17+
steps:
18+
- uses: actions/checkout@v4.1.1
19+
with:
20+
fetch-depth: 0
21+
- id: describe
22+
name: Describe HEAD
23+
run: >-
24+
echo "describe=$(git describe --tags --always || echo 0)"
25+
| tee $GITHUB_OUTPUT
26+
- name: Setup and build
27+
run: |
28+
ARCH=${{ matrix.arch }} ./scripts/build-rootfs.sh
29+
- name: Upload artifacts
30+
uses: actions/upload-artifact@v4
31+
with:
32+
# yamllint disable-line rule:line-length
33+
name: ${{ github.event.repository.name }}-${{ steps.describe.outputs.describe }}-${{ matrix.arch }}
34+
path: build/dist/
35+
- name: Upload Release Asset
36+
id: upload-release-asset
37+
uses: softprops/action-gh-release@v2
38+
if: startsWith(github.ref, 'refs/tags/')
39+
with:
40+
files: build/dist/*
41+
# yamllint disable-line rule:line-length
42+
# TODO: Sign asset: https://github.com/softprops/action-gh-release/issues/580#2025
43+

0 commit comments

Comments
 (0)