mirror of
https://github.com/13hannes11/toolbx-tuner.git
synced 2024-09-03 23:21:00 +02:00
87 lines
2.4 KiB
YAML
87 lines
2.4 KiB
YAML
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
|
|
name: build-and-prerelease
|
|
|
|
jobs:
|
|
flatpak:
|
|
name: "Flatpak"
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: bilelmoussaoui/flatpak-github-actions:gnome-46
|
|
options: --privileged
|
|
strategy:
|
|
matrix:
|
|
target: [ToolboxTuner, ToolboxTuner.Devel, ToolboxTuner.Screenshot]
|
|
arch: [x86_64, aarch64]
|
|
# Don't fail the whole workflow if one architecture fails
|
|
fail-fast: false
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
lfs: true
|
|
# Docker is required by the docker/setup-qemu-action which enables emulation
|
|
- name: Install deps
|
|
if: ${{ matrix.arch != 'x86_64' }}
|
|
run: |
|
|
dnf -y install docker
|
|
- name: Set up QEMU
|
|
if: ${{ matrix.arch != 'x86_64' }}
|
|
id: qemu
|
|
uses: docker/setup-qemu-action@v2
|
|
with:
|
|
platforms: arm64
|
|
- uses: bilelmoussaoui/flatpak-github-actions/flatpak-builder@v6.3
|
|
with:
|
|
bundle: ${{ matrix.target }}.${{ matrix.arch }}.flatpak
|
|
manifest-path: build-aux/org.kuchelmeister.${{ matrix.target }}.json
|
|
run-tests: true
|
|
cache-key: flatpak-builder-${{ github.sha }}
|
|
upload-artifact: false
|
|
arch: ${{ matrix.arch }}
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: flatpak-release-${{ matrix.target }}-${{ matrix.arch }}
|
|
path: |
|
|
*.flatpak
|
|
vendor:
|
|
name: vendor-prerelease
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
lfs: true
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- run: ./build-aux/dist-vendor.sh dist . && tar czf vendor.tar.gz dist
|
|
- run: sha256sum vendor.tar.gz > vendor.tar.gz.sha256sum
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: vendor
|
|
path: |
|
|
*.tar.gz
|
|
*.sha256sum
|
|
publish-prerelease:
|
|
name: publish-prerelease
|
|
needs: [flatpak, vendor]
|
|
runs-on: ubuntu-latest
|
|
if: startsWith(github.ref_name, 'main') && github.ref_type == 'branch'
|
|
steps:
|
|
- uses: actions/download-artifact@v4
|
|
- name: Show files
|
|
run: ls -R
|
|
- uses: "dciborow/action-github-releases@v1.0.1"
|
|
with:
|
|
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
|
prerelease: true
|
|
automatic_release_tag: dev
|
|
title: 'Latest Development Build'
|
|
files: |
|
|
**/*.Devel.*.flatpak
|
|
**/*.tar.gz
|
|
**/*.sha256sum
|
|
|
|
|