mirror of
https://github.com/bolucat/Archive.git
synced 2026-04-23 00:17:16 +08:00
74 lines
2.3 KiB
YAML
74 lines
2.3 KiB
YAML
name: Build Artifacts (Flatpak)
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
logLevel:
|
|
description: 'Log level'
|
|
required: true
|
|
default: 'warning'
|
|
type: choice
|
|
options:
|
|
- info
|
|
- warning
|
|
- debug
|
|
tags:
|
|
description: 'Test scenario tags'
|
|
required: false
|
|
type: boolean
|
|
pull_request:
|
|
branches: [master, develop]
|
|
paths-ignore:
|
|
- '**/*.md'
|
|
- '.circleci/**'
|
|
- '.cirrus.yml'
|
|
push:
|
|
branches: [master, develop]
|
|
paths-ignore:
|
|
- '**/*.md'
|
|
- '.circleci/**'
|
|
- '.cirrus.yml'
|
|
release:
|
|
types: [published]
|
|
schedule:
|
|
- cron: '0 16 * * *'
|
|
concurrency:
|
|
group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
|
|
cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }}
|
|
env:
|
|
GOPROXY: direct
|
|
jobs:
|
|
flatpak-release:
|
|
strategy:
|
|
fail-fast: false
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Checkout with shallow submodules
|
|
run: |
|
|
# unshallow must come first otherwise submodule may be get unshallowed
|
|
git fetch --tags --unshallow
|
|
git submodule update --init --depth 1
|
|
- name: Change ubuntu mirror
|
|
run: |
|
|
sudo sed -i 's/azure.archive.ubuntu.com/azure.archive.ubuntu.com/g' /etc/apt/sources.list
|
|
sudo apt-get update -qq
|
|
- name: Populate depedencies
|
|
run: |
|
|
sudo apt-get install -y libarchive-tools zstd
|
|
sudo apt-get install -y flatpak flatpak-builder
|
|
- name: Build Flatpak package
|
|
run: |
|
|
flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
|
cd flatpak
|
|
make
|
|
flatpak-builder --user --install-deps-from=flathub --disable-updates --force-clean --repo=repo builddir it.gui.yass.yml
|
|
flatpak build-bundle repo yass.flatpak it.gui.yass --runtime-repo=https://flathub.org/repo/flathub.flatpakrepo
|
|
cd ..
|
|
mv -fv flatpak/yass.flatpak yass-${{ github.event.release.tag_name }}.flatpak
|
|
- name: Upload dist tarball (including debuginfo)
|
|
if: ${{ github.event_name == 'release' }}
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
gh release upload ${{ github.event.release.tag_name }} yass*.flatpak
|