Files
xtool-mirror/.github/workflows/release.yml
2025-05-11 16:05:58 +05:30

76 lines
2.3 KiB
YAML

on:
workflow_dispatch:
jobs:
build-linux:
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 bash -c "Linux/build.sh && mv Linux/packages/xtool{,-${{ matrix.host.arch }}}.AppImage"
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: xtool-${{ matrix.host.arch }}
path: Linux/packages/xtool-${{ matrix.host.arch }}.AppImage
build-mac:
runs-on: macos-15
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
working-directory: macOS
bundler-cache: true
- name: Build
env:
APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY_ID }}
APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }}
APP_STORE_CONNECT_API_KEY_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY }}
IDENTITY_P12: ${{ secrets.IDENTITY_P12 }}
DEVELOPMENT_TEAM: ${{ secrets.DEVELOPMENT_TEAM }}
run: |
cd macOS
bundle exec fastlane package
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: xtool-mac
path: |
macOS/Build/Output/xtool.app.zip
macOS/Build/Output/xtool.app.dSYM.zip
release:
needs: [build-linux, build-mac]
runs-on: ubuntu-24.04
permissions:
contents: write
env:
GH_TOKEN: ${{ github.token }}
steps:
- uses: actions/checkout@v4
- name: Download artifact
uses: actions/download-artifact@v4
with:
pattern: xtool-*
path: output
- name: Create and publish release
run: |
TAG="${GITHUB_REF##*/}-${GITHUB_SHA:0:7}"
gh release create "$TAG" --draft --title "Draft Release"
gh release upload "$TAG" output/**/*.{AppImage,app.zip,app.dSYM.zip}