1919 sign-windows-binaries :
2020 description : Sign Windows binaries
2121 type : boolean
22- default : true
22+ default : false
2323 required : false
2424
2525jobs :
@@ -40,33 +40,48 @@ jobs:
4040 runs-on : ${{ matrix.platform }}
4141
4242 steps :
43- - name : 📥 Check out code
43+ - name : Check out code
4444 uses : actions/checkout@v4
4545 with :
4646 fetch-depth : 0
4747
48- - name : 🧰 Setup Rust toolchain
48+ - name : Setup Rust toolchain
4949 uses : actions-rust-lang/setup-rust-toolchain@v1
5050 with :
5151 rustflags : ' '
5252 target : ${{ startsWith(matrix.platform, 'macos') && 'x86_64-apple-darwin' || '' }}
5353
54- - name : 🧰 Install pnpm
54+ - name : Install pnpm
5555 uses : pnpm/action-setup@v4
5656
57- - name : 🧰 Setup Node.js
57+ - name : Setup Node.js
5858 uses : actions/setup-node@v4
5959 with :
6060 node-version-file : .nvmrc
6161 cache : pnpm
6262
63- - name : 🧰 Install Linux build dependencies
63+ - name : Generate tauri-dev.conf.json
64+ shell : bash
65+ run : |
66+ GIT_HASH=$(git rev-parse --short HEAD)
67+ cat > apps/app/tauri-dev.conf.json <<EOF
68+ {
69+ "productName": "Modrinth App (dev-${GIT_HASH})",
70+ "mainBinaryName": "Modrinth App (dev-${GIT_HASH})",
71+ "identifier": "ModrinthApp-dev-${GIT_HASH}",
72+ "bundle": {
73+ "fileAssociations": []
74+ }
75+ }
76+ EOF
77+
78+ - name : Install Linux build dependencies
6479 if : startsWith(matrix.platform, 'ubuntu')
6580 run : |
6681 sudo apt-get update
6782 sudo apt-get install -yq libwebkit2gtk-4.1-dev libayatana-appindicator3-dev librsvg2-dev
6883
69- - name : 🧰 Setup Dasel
84+ - name : Setup Dasel
7085 uses : jaxxstorm/action-install-gh-release@v2.1.0
7186 with :
7287 repo : TomWright/dasel
7590 rename-to : ${{ startsWith(matrix.platform, 'windows') && 'dasel.exe' || 'dasel' }}
7691 chmod : 0755
7792
78- - name : ⚙️ Set application version and environment
93+ - name : Set application version and environment
7994 shell : bash
8095 run : |
8196 APP_VERSION="$(git describe --tags --always | sed -E 's/-([0-9]+)-(g[0-9a-fA-F]+)$/-canary+\1.\2/')"
@@ -86,13 +101,13 @@ jobs:
86101
87102 cp packages/app-lib/.env.prod packages/app-lib/.env
88103
89- - name : 💨 Setup Turbo cache
104+ - name : Setup Turbo cache
90105 uses : rharkor/caching-for-turbo@v1.8
91106
92- - name : 🧰 Install dependencies
107+ - name : Install dependencies
93108 run : pnpm install
94109
95- - name : ✍️ Set up Windows code signing
110+ - name : Set up Windows code signing
96111 if : startsWith(matrix.platform, 'windows')
97112 shell : bash
98113 run : |
@@ -102,8 +117,8 @@ jobs:
102117 dasel delete -f apps/app/tauri-release.conf.json 'bundle.windows.signCommand'
103118 fi
104119
105- - name : 🔨 Build macOS app
106- run : pnpm --filter=@modrinth/app run tauri build --target universal-apple-darwin --config tauri-release.conf.json
120+ - name : Build macOS app
121+ run : ${{ github.ref == 'refs/heads/main' && ' pnpm --filter=@modrinth/app run tauri build --target universal-apple-darwin --config tauri-release.conf.json' || 'pnpm --filter=@modrinth/app run tauri build --target universal-apple-darwin --config tauri-dev.conf.json' }}
107122 if : startsWith(matrix.platform, 'macos')
108123 env :
109124 ENABLE_CODE_SIGNING : ${{ secrets.APPLE_CERTIFICATE }}
@@ -116,19 +131,19 @@ jobs:
116131 TAURI_SIGNING_PRIVATE_KEY : ${{ secrets.TAURI_PRIVATE_KEY }}
117132 TAURI_SIGNING_PRIVATE_KEY_PASSWORD : ${{ secrets.TAURI_KEY_PASSWORD }}
118133
119- - name : 🔨 Build Linux app
120- run : pnpm --filter=@modrinth/app run tauri build --config tauri-release.conf.json
134+ - name : Build Linux app
135+ run : ${{ github.ref == 'refs/heads/main' && ' pnpm --filter=@modrinth/app run tauri build --config tauri-release.conf.json' || 'pnpm --filter=@modrinth/app run tauri build --config tauri-dev.conf.json' }}
121136 if : startsWith(matrix.platform, 'ubuntu')
122137 env :
123138 TAURI_SIGNING_PRIVATE_KEY : ${{ secrets.TAURI_PRIVATE_KEY }}
124139 TAURI_SIGNING_PRIVATE_KEY_PASSWORD : ${{ secrets.TAURI_KEY_PASSWORD }}
125140
126- - name : 🔨 Build Windows app
141+ - name : Build Windows app
127142 run : |
128143 [System.Convert]::FromBase64String("$env:DIGICERT_ONE_SIGNER_CLIENT_CERTIFICATE_BASE64") | Set-Content -Path signer-client-cert.p12 -AsByteStream
129144 $env:DIGICERT_ONE_SIGNER_CREDENTIALS = "$env:DIGICERT_ONE_SIGNER_API_KEY|$PWD\signer-client-cert.p12|$env:DIGICERT_ONE_SIGNER_CLIENT_CERTIFICATE_PASSWORD"
130145 $env:JAVA_HOME = "$env:JAVA_HOME_17_X64"
131- pnpm --filter=@modrinth/app run tauri build --config tauri-release.conf.json --verbose --bundles ' nsis,updater'
146+ ${{ github.ref == 'refs/heads/main' && ' pnpm --filter=@modrinth/app run tauri build --config tauri-release.conf.json --verbose --bundles "nsis,updater"' || 'pnpm --filter=@modrinth/app run tauri build --config tauri-dev.conf.json --verbose --bundles " nsis,updater"' }}
132147 Remove-Item -Path signer-client-cert.p12 -ErrorAction SilentlyContinue
133148 if : startsWith(matrix.platform, 'windows')
134149 env :
@@ -138,15 +153,21 @@ jobs:
138153 DIGICERT_ONE_SIGNER_CLIENT_CERTIFICATE_BASE64 : ${{ secrets.DIGICERT_ONE_SIGNER_CLIENT_CERTIFICATE_BASE64 }}
139154 DIGICERT_ONE_SIGNER_CLIENT_CERTIFICATE_PASSWORD : ${{ secrets.DIGICERT_ONE_SIGNER_CLIENT_CERTIFICATE_PASSWORD }}
140155
141- - name : 📤 Upload app bundles
156+ - name : Upload app bundles
142157 uses : actions/upload-artifact@v4
143158 with :
144159 name : App bundle (${{ matrix.artifact-target-name }})
145160 path : |
146161 target/release/bundle/appimage/Modrinth App_*.AppImage*
147162 target/release/bundle/deb/Modrinth App_*.deb*
148163 target/release/bundle/rpm/Modrinth App-*.rpm*
164+ target/release/bundle/appimage/Modrinth App (dev-*)_*.AppImage*
165+ target/release/bundle/deb/Modrinth App (dev-*)_*.deb*
166+ target/release/bundle/rpm/Modrinth App (dev-*)-*.rpm*
149167 target/universal-apple-darwin/release/bundle/macos/Modrinth App.app.tar.gz*
168+ target/universal-apple-darwin/release/bundle/macos/Modrinth App (dev-*)*.app.tar.gz
169+ target/universal-apple-darwin/release/bundle/dmg/Modrinth App (dev-*)*.dmg
150170 target/universal-apple-darwin/release/bundle/dmg/Modrinth App_*.dmg*
151171 target/release/bundle/nsis/Modrinth App_*-setup.exe*
172+ target/release/bundle/nsis/Modrinth App (dev-*)_*-setup.exe*
152173 target/release/bundle/nsis/Modrinth App_*-setup.nsis.zip*
0 commit comments