mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 18:12:29 +08:00
feat(forge): match name for artifacts
This commit is contained in:
parent
4108f7f353
commit
a7d6bf1bd8
1
.github/actions/build-electron/action.yml
vendored
1
.github/actions/build-electron/action.yml
vendored
@ -81,6 +81,7 @@ runs:
|
|||||||
APPLE_ID: ${{ env.APPLE_ID }}
|
APPLE_ID: ${{ env.APPLE_ID }}
|
||||||
APPLE_ID_PASSWORD: ${{ env.APPLE_ID_PASSWORD }}
|
APPLE_ID_PASSWORD: ${{ env.APPLE_ID_PASSWORD }}
|
||||||
WINDOWS_SIGN_EXECUTABLE: ${{ env.WINDOWS_SIGN_EXECUTABLE }}
|
WINDOWS_SIGN_EXECUTABLE: ${{ env.WINDOWS_SIGN_EXECUTABLE }}
|
||||||
|
TRILIUM_ARTIFACT_NAME_HINT: TriliumNextNotes ${{ inputs.os }} ${{ inputs.arch }}
|
||||||
run: |
|
run: |
|
||||||
npm run electron-forge:make -- \
|
npm run electron-forge:make -- \
|
||||||
--arch=${{ inputs.arch }} \
|
--arch=${{ inputs.arch }} \
|
||||||
|
@ -143,11 +143,18 @@ module.exports = {
|
|||||||
for (const makeResult of makeResults) {
|
for (const makeResult of makeResults) {
|
||||||
for (const artifactPath of makeResult.artifacts) {
|
for (const artifactPath of makeResult.artifacts) {
|
||||||
// Ignore certain artifacts.
|
// Ignore certain artifacts.
|
||||||
const fileName = path.basename(artifactPath);
|
let fileName = path.basename(artifactPath);
|
||||||
if (fileName === "RELEASES" || path.extname(fileName) === ".nupkg") {
|
const extension = path.extname(fileName);
|
||||||
|
if (fileName === "RELEASES" || extension === ".nupkg") {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Override the extension for the CI.
|
||||||
|
const { TRILIUM_ARTIFACT_NAME_HINT } = process.env;
|
||||||
|
if (TRILIUM_ARTIFACT_NAME_HINT) {
|
||||||
|
fileName = TRILIUM_ARTIFACT_NAME_HINT + extension;
|
||||||
|
}
|
||||||
|
|
||||||
const outputPath = path.join(outputDir, fileName);
|
const outputPath = path.join(outputDir, fileName);
|
||||||
console.log(`[Artifact] ${artifactPath} -> ${outputPath}`);
|
console.log(`[Artifact] ${artifactPath} -> ${outputPath}`);
|
||||||
fs.copyFile(artifactPath, outputPath);
|
fs.copyFile(artifactPath, outputPath);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user