mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix(ci): URL-encode asset filenames and allow release updates
Spaces in Electron Forge filenames (e.g. "5chan Setup.exe") broke markdown download links in the release body. Also add allowUpdates to finalize-release so it succeeds when a release already exists.
This commit is contained in:
@@ -320,4 +320,5 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
artifacts: 'release-assets/*'
|
artifacts: 'release-assets/*'
|
||||||
bodyFile: "release-body.txt"
|
bodyFile: "release-body.txt"
|
||||||
|
allowUpdates: true
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ if (remoteFiles.length) {
|
|||||||
files = remoteFiles;
|
files = remoteFiles;
|
||||||
}
|
}
|
||||||
|
|
||||||
const linkTo = (file) => `https://github.com/bitsocialnet/5chan/releases/download/v${version}/${file}`;
|
const linkTo = (file) => `https://github.com/bitsocialnet/5chan/releases/download/v${version}/${encodeURIComponent(file)}`;
|
||||||
const has = (s, sub) => s.toLowerCase().includes(sub);
|
const has = (s, sub) => s.toLowerCase().includes(sub);
|
||||||
const isArm = (s) => has(s, 'arm64') || has(s, 'aarch64');
|
const isArm = (s) => has(s, 'arm64') || has(s, 'aarch64');
|
||||||
const isX64 = (s) => has(s, 'x64') || has(s, 'x86_64') || !isArm(s);
|
const isX64 = (s) => has(s, 'x64') || has(s, 'x86_64') || !isArm(s);
|
||||||
|
|||||||
Reference in New Issue
Block a user