on: push: tags: - "*" 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 \ -e XTOOL_VERSION=${{ github.ref_name }} \ --rm xtool Linux/build.sh - name: Upload artifact uses: actions/upload-artifact@v4 with: name: xtool-${{ matrix.host.arch }} path: | Linux/packages/xtool-${{ matrix.host.arch }}.AppImage Linux/packages/xtool-${{ matrix.host.arch }}.AppImage.zsync 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 }} XTOOL_VERSION: ${{ github.ref_name }} 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_name }}" gh release create "$TAG" --draft --title "v$TAG" gh release upload "$TAG" output/**/*.{AppImage,AppImage.zsync,app.zip,app.dSYM.zip}