Files
2026-08-14 13:24:17 +02:00

94 lines
3.1 KiB
YAML

name: Build
on:
release:
types: [published]
workflow_dispatch:
jobs:
build-amd64:
runs-on: debian-latest
permissions:
contents: read
releases: write
env:
CMAKE_BUILD_PARALLEL_LEVEL: 2
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
apt-get update
apt-get install -y --no-install-recommends \
cmake g++ pkg-config python3 dpkg-dev libgtk-3-dev libcurl4-openssl-dev \
libgstreamer1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good libsecret-1-dev \
libjson-glib-dev wtype xdotool
- name: Configure
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
- name: Build
run: cmake --build build --parallel 2
- name: Package
run: |
cmake --build build --target package --parallel 2
mkdir -p artifacts
cp build/*.deb artifacts/
sha256sum artifacts/*.deb > artifacts/SHA256SUMS-amd64
- name: Attach packages to the Gitea release
if: gitea.event_name == 'release'
shell: bash
env:
GITEA_SERVER_URL: ${{ gitea.server_url }}
GITEA_REPOSITORY: ${{ gitea.repository }}
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
GITEA_RELEASE_TAG: ${{ gitea.event.release.tag_name }}
run: scripts/publish-release-assets.sh
- name: Upload Debian packages
if: always()
uses: christopherhx/gitea-upload-artifact@v4
with:
name: transui-debian-amd64
path: artifacts/
if-no-files-found: error
build-arm64:
runs-on: debian-latest-arm64
permissions:
contents: read
releases: write
env:
CMAKE_BUILD_PARALLEL_LEVEL: 2
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
apt-get update
apt-get install -y --no-install-recommends \
cmake g++ pkg-config python3 dpkg-dev libgtk-3-dev libcurl4-openssl-dev \
libgstreamer1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good libsecret-1-dev \
libjson-glib-dev wtype xdotool
- name: Configure
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
- name: Build
run: cmake --build build --parallel 2
- name: Package
run: |
cmake --build build --target package --parallel 2
mkdir -p artifacts
cp build/*.deb artifacts/
sha256sum artifacts/*.deb > artifacts/SHA256SUMS-arm64
- name: Attach packages to the Gitea release
if: gitea.event_name == 'release'
shell: bash
env:
GITEA_SERVER_URL: ${{ gitea.server_url }}
GITEA_REPOSITORY: ${{ gitea.repository }}
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
GITEA_RELEASE_TAG: ${{ gitea.event.release.tag_name }}
run: scripts/publish-release-assets.sh
- name: Upload Debian packages
if: always()
uses: christopherhx/gitea-upload-artifact@v4
with:
name: transui-debian-arm64
path: artifacts/
if-no-files-found: error