improve upload artifacts

pull/2715/head
Mikael Finstad 7 months ago
parent 2601094200
commit 2601104eb5
No known key found for this signature in database
GPG Key ID: 25AB36E3E81CBC26

@ -140,32 +140,22 @@ jobs:
node script/xcrunWrapper.ts dist/mas-universal/LosslessCut-mac-universal.pkg ${{ secrets.api_key_id }} ${{ secrets.api_key_issuer_id }} 1505323402 no.mifi.losslesscut-mac
- name: (MacOS) Upload artifacts
uses: actions/upload-artifact@v4
if: startsWith(matrix.os, 'macos') && env.is_tag == 'false'
with:
name: MacOS
path: |
dist/LosslessCut-mac-arm64.dmg
dist/LosslessCut-mac-x64.dmg
screenshot.jpeg
run: |
yarn upload-artifacts dist/LosslessCut-mac-arm64.dmg
yarn upload-artifacts dist/LosslessCut-mac-x64.dmg
yarn upload-artifacts --name screenshot-mac.jpeg screenshot.jpeg
- name: (Windows) Upload artifacts
uses: actions/upload-artifact@v4
if: startsWith(matrix.os, 'windows') && env.is_tag == 'false'
with:
name: Windows
path: |
dist/LosslessCut-win-x64.7z
screenshot.jpeg
run: |
yarn upload-artifacts dist/LosslessCut-win-x64.7z
yarn upload-artifacts --name screenshot-windows.jpeg screenshot.jpeg
- name: (Linux) Upload artifacts
uses: actions/upload-artifact@v4
- name: (Linu) Upload artifacts
if: startsWith(matrix.os, 'ubuntu') && env.is_tag == 'false'
with:
name: Linux
path: |
dist/LosslessCut-linux-arm64.tar.bz2
dist/LosslessCut-linux-armv7l.tar.bz2
dist/LosslessCut-linux-x64.tar.bz2
screenshot.jpeg
run: |
yarn upload-artifacts dist/LosslessCut-linux-arm64.tar.bz2
yarn upload-artifacts dist/LosslessCut-linux-armv7l.tar.bz2
yarn upload-artifacts dist/LosslessCut-linux-x64.tar.bz2
yarn upload-artifacts --name screenshot-linux.jpeg screenshot.jpeg

@ -29,7 +29,8 @@
"generate-icon": "mkdirp icon-build build-resources/appx && node script/generateIcon.ts",
"generate-licenses": "yarn licenses generate-disclaimer -R > licenses.txt && echo '\n\nffmpeg is licensed under GPL v2+:\n\nhttp://www.gnu.org/licenses/old-licenses/gpl-2.0.html' >> licenses.txt",
"generate-docs": "node script/generateDocs.ts",
"check-licenses": "node script/checkLicenses.ts"
"check-licenses": "node script/checkLicenses.ts",
"upload-artifacts": "node script/uploadArtifacts.ts"
},
"author": {
"name": "Mikael Finstad",
@ -42,6 +43,7 @@
},
"license": "GPL-2.0-only",
"devDependencies": {
"@actions/artifact": "^5.0.1",
"@adamscybot/react-leaflet-component-marker": "^2.0.3",
"@dnd-kit/core": "^6.3.1",
"@dnd-kit/modifiers": "^9.0.0",
@ -74,6 +76,7 @@
"@types/react-syntax-highlighter": "^15.5.13",
"@types/semver": "^7.7.1",
"@types/smpte-timecode": "^1.2.5",
"@types/yargs": "^17.0.35",
"@types/yargs-parser": "^21.0.3",
"@typescript-eslint/eslint-plugin": "^8.52.0",
"@typescript-eslint/parser": "^8.52.0",
@ -131,7 +134,8 @@
"use-debounce": "^5.2.1",
"use-trace-update": "^1.3.3",
"vite": "^7.3.0",
"vitest": "^4.0.16"
"vitest": "^4.0.16",
"yargs": "^18.0.0"
},
"dependencies": {
"@electron/remote": "^2.1.3",

@ -0,0 +1,24 @@
import { DefaultArtifactClient } from '@actions/artifact';
import assert from 'node:assert';
import { basename } from 'node:path';
import yargs from 'yargs';
import { hideBin } from 'yargs/helpers';
const args = yargs(hideBin(process.argv))
.option('name', {
type: 'string',
})
.parseSync();
assert(args._.length > 0, 'Please provide one or more files');
const client = new DefaultArtifactClient();
const name = args.name ?? basename(String(args._[0]));
await client.uploadArtifact(
name,
args._.map(String),
process.cwd(), // root directory
);

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save