Skip to content

fix(ci): Align secret to GH_SL_ACCESS_TOKEN #24

fix(ci): Align secret to GH_SL_ACCESS_TOKEN

fix(ci): Align secret to GH_SL_ACCESS_TOKEN #24

Workflow file for this run

# 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:
permissions:
contents: read
runs-on: ubuntu-24.04
strategy:
matrix:
arch:
- amd64
- arm64
# - armhf # TODO Enable when supported
steps:
# yamllint disable-line rule:line-length
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
# Relate-to: https://github.com/actions/checkout/pull/2081#2025
ref: ${{ github.ref }}
- 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: Upload artifacts
# yamllint disable-line rule:line-length
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
# yamllint disable-line rule:line-length
name: ${{ github.event.repository.name }}-${{ steps.describe.outputs.describe }}-${{ matrix.arch }}
path: build/dist/
- name: Build documentation once
if: startsWith(github.ref, 'refs/tags/') && matrix.arch == 'amd64'
run: >-
./scripts/build-rootfs.sh docs/dist
- name: Upload Release Asset
id: upload-release-asset
env:
token-defined: ${{ secrets.GH_SL_ACCESS_TOKEN != '' }}
# yamllint disable-line rule:line-length
if: github.ref_type == 'tag' && env.token-defined
# yamllint disable-line rule:line-length
uses: softprops/action-gh-release@da05d552573ad5aba039eaac05058a918a7bf631 # v2.2.2
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_SL_ACCESS_TOKEN }}
- name: Upload pages artifact
id: deployment
if: startsWith(github.ref, 'refs/tags/') && matrix.arch == 'amd64'
# yamllint disable-line rule:line-length
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
with:
path: docs/
deploy:
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-24.04
steps:
- name: Deploy to GitHub Pages
id: deployment
# yamllint disable-line rule:line-length
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5
if: startsWith(github.ref, 'refs/tags/')