Fix release workflow (#2668)

* Fix frontend bundle upload
 - Update pnpm

* Revert incorrect removal of fontenf packaging job

* Fix tauri not building updater bundles

* Ensure release action is executed when PRs modify the publish-artifacts action

* Fix unused argument for patchTauri function

* Couple for format fixes

* tauri requires building the app bundle to build the updater
This commit is contained in:
Vítor Vasconcellos
2024-08-17 08:29:32 +00:00
committed by GitHub
parent f2f39a2a46
commit 287a809de0
14 changed files with 116 additions and 83 deletions

View File

@@ -53,11 +53,10 @@ export async function tauriUpdaterKey(nativeDeps) {
* @param {string} root
* @param {string} nativeDeps
* @param {string[]} targets
* @param {string[]} bundles
* @param {string[]} args
* @returns {Promise<string[]>}
*/
export async function patchTauri(root, nativeDeps, targets, bundles, args) {
export async function patchTauri(root, nativeDeps, targets, args) {
if (args.findIndex(e => e === '-c' || e === '--config') !== -1) {
throw new Error('Custom tauri build config is not supported.')
}
@@ -91,18 +90,12 @@ export async function patchTauri(root, nativeDeps, targets, bundles, args) {
.readFile(path.join(tauriRoot, 'tauri.conf.json'), 'utf-8')
.then(JSON.parse)
if (bundles.length === 0) {
const defaultBundles = tauriConfig?.bundle?.targets
if (Array.isArray(defaultBundles)) bundles.push(...defaultBundles)
if (bundles.length === 0) bundles.push('all')
}
switch (args[0]) {
case 'dev':
tauriPatch.build.features.push('devtools')
break
case 'build': {
if (tauriConfig?.plugins?.updater?.active) {
if (tauriConfig?.bundle?.createUpdaterArtifacts !== false) {
const pubKey = await tauriUpdaterKey(nativeDeps)
if (pubKey != null) tauriPatch.plugins.updater.pubkey = pubKey
}
@@ -111,6 +104,7 @@ export async function patchTauri(root, nativeDeps, targets, bundles, args) {
}
if (osType === 'Darwin') {
// arm64 support was added in macOS 11.0
const macOSArm64MinimumVersion = '11.0'
let macOSMinimumVersion = tauriConfig?.bundle?.macOS?.minimumSystemVersion