mirror of
https://github.com/xtool-org/xtool.git
synced 2026-02-04 11:53:30 +01:00
50 lines
1.3 KiB
YAML
50 lines
1.3 KiB
YAML
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
host:
|
|
- runner: ubuntu-24.04
|
|
arch: x86_64
|
|
- runner: ubuntu-24.04-arm
|
|
arch: aarch64
|
|
runs-on: ${{ matrix.host.runner }}
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
- name: Build
|
|
run: |
|
|
docker compose run --build --rm xtool -c "Linux/build.sh && mv Linux/packages/xtool{,-${{ matrix.host.arch }}}.AppImage"
|
|
- name: Upload artifact
|
|
id: upload_artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: xtool-${{ matrix.host.arch }}
|
|
path: Linux/packages/xtool-${{ matrix.host.arch }}.AppImage
|
|
release:
|
|
needs: build
|
|
runs-on: ubuntu-24.04
|
|
permissions:
|
|
contents: write
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Download artifact
|
|
id: download_artifact
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
pattern: xtool-*
|
|
path: output
|
|
- name: Create and publish release
|
|
id: publish_release
|
|
run: |
|
|
TAG="${GITHUB_REF##*/}-${GITHUB_SHA:0:7}"
|
|
gh release create "$TAG" --draft --title "Draft Release"
|
|
gh release upload "$TAG" output/**/*.AppImage
|