Skip to content

chore(v5): rename PiOSK to XiOSK (#149) #10

chore(v5): rename PiOSK to XiOSK (#149)

chore(v5): rename PiOSK to XiOSK (#149) #10

Workflow file for this run

name: Build and Release XiOSK Package
on:
push:
tags:
- 'v*'
workflow_dispatch:
permissions:
contents: write
jobs:
build:
name: Build Package for ${{ matrix.arch }}
runs-on: ubuntu-latest
strategy:
matrix:
arch: [ x86_64, aarch64 ]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Deno
uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- name: Compile binary
run: |
deno compile \
--allow-net \
--allow-read \
--allow-write \
--allow-run \
--allow-env \
--target ${{ matrix.arch }}-unknown-linux-gnu \
--output xiosk \
dashboard/index.ts
- name: Assemble Release Package
run: |
# 1. Create a staging directory to build the package.
mkdir staging
# 2. Copy all necessary assets into the staging directory.
cp -r dashboard/ scripts/ services/ config.json.sample staging/
# 3. Move the compiled binary into the 'dashboard' subdirectory inside staging.
mv xiosk staging/dashboard/
# 4. Create the final tarball from the contents of the staging directory.
# The -C flag ensures the paths inside the tarball are clean (no leading 'staging/').
tar -czf xiosk-linux-${{ matrix.arch }}.tar.gz -C staging .
- name: Upload Package as Artifact
uses: actions/upload-artifact@v4
with:
name: xiosk-package-${{ matrix.arch }}
path: xiosk-linux-${{ matrix.arch }}.tar.gz
if-no-files-found: error # Fail if the package wasn't created
release:
name: Create Release
needs: build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: ./artifacts
- name: Create Release
uses: softprops/action-gh-release@v2
with:
files: ./artifacts/*/*.tar.gz
draft: false
prerelease: true
generate_release_notes: true