name: Modrinth App build on: push: branches: - main tags: - 'v*' paths: - .github/workflows/theseus-build.yml - 'apps/app/**' - 'apps/app-frontend/**' - 'packages/app-lib/**' - 'packages/app-macros/**' - 'packages/assets/**' - 'packages/ui/**' - 'packages/utils/**' workflow_dispatch: inputs: sign-windows-binaries: description: Sign Windows binaries type: boolean default: false required: false environment: description: Environment type: choice options: - prod - staging - prod-with-staging-archon default: prod required: false concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/prod' }} jobs: build: name: Build env: VITE_STRIPE_PUBLISHABLE_KEY: pk_live_51JbFxJJygY5LJFfKLVVldb10HlLt24p421OWRsTOWc5sXYFOnFUXWieSc6HD3PHo25ktx8db1WcHr36XGFvZFVUz00V9ixrCs5 # SCCACHE_DIR: '/mnt/sccache' # SCCACHE_CACHE_SIZE: '10G' # SCCACHE_MULTILEVEL_CHAIN: 'disk,s3' SCCACHE_S3_KEY_PREFIX: '${{ github.repository }}/' SCCACHE_BUCKET: ${{ secrets.SCCACHE_BUCKET }} SCCACHE_REGION: ${{ secrets.SCCACHE_REGION }} SCCACHE_ENDPOINT: ${{ secrets.SCCACHE_ENDPOINT }} AWS_ACCESS_KEY_ID: ${{ secrets.SCCACHE_S3_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.SCCACHE_S3_SECRET_ACCESS_KEY }} RUSTC_WRAPPER: 'sccache' strategy: fail-fast: false matrix: platform: [ blacksmith-6vcpu-macos-26, blacksmith-8vcpu-windows-2025, # At time of writing, Windows 4 vCPU VMs don't seem to actually exist blacksmith-4vcpu-ubuntu-2404, ] include: - platform: blacksmith-6vcpu-macos-26 artifact-target-name: universal-apple-darwin - platform: blacksmith-8vcpu-windows-2025 artifact-target-name: x86_64-pc-windows-msvc - platform: blacksmith-4vcpu-ubuntu-2404 artifact-target-name: x86_64-unknown-linux-gnu runs-on: ${{ matrix.platform }} steps: - name: Check out code uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: fetch-depth: 0 - name: Setup Rust toolchain uses: actions-rust-lang/setup-rust-toolchain@2b1f5e9b395427c92ee4e3331786ca3c37afe2d7 # v1.16.0 with: rustflags: '' target: ${{ contains(matrix.platform, 'macos') && 'x86_64-apple-darwin' || '' }} - name: Setup sccache uses: mozilla-actions/sccache-action@9e7fa8a12102821edf02ca5dbea1acd0f89a2696 # v0.0.10 - name: Enable Corepack run: corepack enable - name: Setup Node uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 with: node-version-file: .nvmrc cache: 'pnpm' - name: Generate tauri-dev.conf.json shell: bash run: | GIT_HASH=$(git rev-parse --short HEAD) cat > apps/app/tauri-dev.conf.json <