-
Notifications
You must be signed in to change notification settings - Fork 3
63 lines (62 loc) · 2.12 KB
/
build-rootfs.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
# YAML -*- mode: yaml; tab-width: 2; indent-tabs-mode: nil; coding: utf-8 -*-
---
name: z-wave-protocol-controller Build in rootfs for arch
on: # yamllint disable-line rule:truthy
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-24.04
strategy:
matrix:
arch:
- amd64
# - armhf # TODO Enable when supported
steps:
- uses: actions/checkout@v4.1.1
with:
fetch-depth: 0
- id: describe
name: Describe HEAD
run: >-
echo "describe=$(git describe --tags --always || echo 0)"
| tee $GITHUB_OUTPUT
- name: Setup and build
run: >-
ARCH=${{ matrix.arch }}
UNIFYSDK_GIT_REPOSITORY=${{ secrets.UNIFYSDK_GIT_REPOSITORY }}
UNIFYSDK_GIT_TAG=${{ secrets.UNIFYSDK_GIT_TAG }}
./scripts/build-rootfs.sh
- name: Build documentation once
run: >-
./scripts/build-rootfs.sh docs/dist
deploy:
needs: build
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-24.04
steps:
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
# yamllint disable-line rule:line-length
name: ${{ github.event.repository.name }}-${{ steps.describe.outputs.describe }}-${{ matrix.arch }}
path: build/dist/
- name: Upload Release Asset
id: upload-release-asset
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: build/dist/*
# yamllint disable-line rule:line-length
# TODO: Sign asset: https://github.com/softprops/action-gh-release/issues/580#2025
token: ${{ secrets.GH_UNIFY_ACCESS_TOKEN }}
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
artifact_name: docs/dist/${{ github.event.repository.name }}-docs-${{ steps.describe.outputs.describe }}.zip