Skip to content

Commit

Permalink
fix: update actions/artifact usage
Browse files Browse the repository at this point in the history
There were slight changes to the artifact API I missed, making
jobs break when time comes to upload.

closes #82
  • Loading branch information
andyholmes committed Feb 17, 2024
1 parent d4fbd0a commit 0dae22b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
7 changes: 3 additions & 4 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -137015,7 +137015,7 @@ async function uploadPagesArtifact(directory) {
'.',
]);

const artifactClient = artifact.create();
const artifactClient = new artifact.DefaultArtifactClient();
await artifactClient.uploadArtifact('github-pages', ['artifact.tar'], '.');
}

Expand Down Expand Up @@ -137136,7 +137136,7 @@ async function run() {
if (core.getBooleanInput('upload-bundles')) {
core.startGroup('Uploading Flatpak bundles...');

const artifactClient = artifact.create();
const artifactClient = new artifact.DefaultArtifactClient();

for (const manifest of manifests) {
try {
Expand All @@ -137145,8 +137145,7 @@ async function run() {
const artifactName = filePath.replace('.flatpak',
`-${core.getInput('arch')}`);

await artifactClient.uploadArtifact(artifactName, [filePath],
'.', { continueOnError: false });
await artifactClient.uploadArtifact(artifactName, [filePath], '.');
} catch (e) {
core.setFailed(`Failed to bundle "${manifest}": ${e.message}`);
}
Expand Down
5 changes: 2 additions & 3 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ async function run() {
if (core.getBooleanInput('upload-bundles')) {
core.startGroup('Uploading Flatpak bundles...');

const artifactClient = artifact.create();
const artifactClient = new artifact.DefaultArtifactClient();

for (const manifest of manifests) {
try {
Expand All @@ -122,8 +122,7 @@ async function run() {
const artifactName = filePath.replace('.flatpak',
`-${core.getInput('arch')}`);

await artifactClient.uploadArtifact(artifactName, [filePath],
'.', { continueOnError: false });
await artifactClient.uploadArtifact(artifactName, [filePath], '.');
} catch (e) {
core.setFailed(`Failed to bundle "${manifest}": ${e.message}`);
}
Expand Down
2 changes: 1 addition & 1 deletion src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ async function uploadPagesArtifact(directory) {
'.',
]);

const artifactClient = artifact.create();
const artifactClient = new artifact.DefaultArtifactClient();
await artifactClient.uploadArtifact('github-pages', ['artifact.tar'], '.');
}

0 comments on commit 0dae22b

Please sign in to comment.