Modern Apps git

xtool.git

Public
git clone https://git.maproj.org/xtool.git
main ▾

xtool.git / .github / workflows / release.yml

release.yml109 lines · 3.2 KiBRaw
1on:
2 push:
3 tags:
4 - "*"
5
6env:
7 XTL_CI: "1"
8
9jobs:
10 build-linux:
11 strategy:
12 fail-fast: false
13 matrix:
14 host:
15 - runner: ubuntu-24.04
16 arch: x86_64
17 - runner: ubuntu-24.04-arm
18 arch: aarch64
19 runs-on: ${{ matrix.host.runner }}
20 permissions:
21 contents: write
22 steps:
23 - name: Checkout
24 uses: actions/checkout@v6
25 - name: Build
26 run: |
27 docker compose run --build \
28 -e XTOOL_VERSION=${{ github.ref_name }} \
29 -e XTL_CI=1 \
30 --rm xtool Linux/build.sh
31 - name: Upload artifact
32 uses: actions/upload-artifact@v7
33 with:
34 name: xtool-${{ matrix.host.arch }}
35 path: |
36 Linux/packages/xtool-${{ matrix.host.arch }}.AppImage
37 Linux/packages/xtool-${{ matrix.host.arch }}.AppImage.zsync
38 build-mac:
39 runs-on: xcode-27
40 permissions:
41 contents: write
42 steps:
43 - name: Checkout
44 uses: actions/checkout@v6
45 - uses: ./.github/actions/configure-xcode
46 - name: Setup Ruby
47 uses: ruby/setup-ruby@v1
48 with:
49 working-directory: macOS
50 bundler-cache: true
51 - name: Build
52 env:
53 APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY_ID }}
54 APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }}
55 APP_STORE_CONNECT_API_KEY_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY }}
56 IDENTITY_P12: ${{ secrets.IDENTITY_P12 }}
57 DEVELOPMENT_TEAM: ${{ secrets.DEVELOPMENT_TEAM }}
58 XTOOL_VERSION: ${{ github.ref_name }}
59 run: |
60 brew install -y xcodegen
61 cd macOS
62 bundle exec fastlane package
63 - name: Upload artifacts
64 uses: actions/upload-artifact@v7
65 with:
66 name: xtool-mac
67 path: |
68 macOS/Build/Output/xtool.app.zip
69 macOS/Build/Output/xtool.app.dSYM.zip
70 release:
71 needs: [build-linux, build-mac]
72 runs-on: ubuntu-24.04
73 permissions:
74 contents: write
75 env:
76 GH_TOKEN: ${{ github.token }}
77 steps:
78 - uses: actions/checkout@v6
79 - name: Download artifact
80 uses: actions/download-artifact@v8
81 with:
82 pattern: xtool-*
83 path: output
84 - name: Create and publish release
85 run: |
86 TAG="${{ github.ref_name }}"
87 gh release create "$TAG" --draft --title "v$TAG"
88 gh release upload "$TAG" output/**/*.{AppImage,AppImage.zsync,app.zip,app.dSYM.zip}
89 docker:
90 uses: docker/github-builder/.github/workflows/build.yml@v1
91 permissions:
92 contents: read # to fetch the repository content
93 id-token: write # for signing attestations and cache entries with GitHub OIDC
94 packages: write # to push built images to GitHub Container Registry
95 with:
96 build-args: |
97 XTL_CI=1
98 output: image
99 push: true
100 platforms: linux/amd64,linux/arm64
101 meta-images: |
102 ghcr.io/xtool-org/xtool
103 meta-tags: |
104 type=semver,pattern={{version}}
105 secrets:
106 registry-auths: |
107 - registry: ghcr.io
108 username: ${{ github.actor }}
109 password: ${{ secrets.GITHUB_TOKEN }}