Compare commits

...

13 Commits

Author SHA1 Message Date
6f51ac03b9 Merge pull request #656 from bdehamer/bdehamer/artifact-digest
Add new `artifact-digest` output
2024-12-17 17:02:00 -05:00
c40c16d999 add new artifact-digest output
Signed-off-by: Brian DeHamer <bdehamer@github.com>
2024-12-17 13:48:06 -08:00
735efb4a0a bump @actions/artifact from 2.1.11 to 2.2.0
Signed-off-by: Brian DeHamer <bdehamer@github.com>
2024-12-17 12:10:23 -08:00
184d73b71b Merge pull request #578 from hamirmahal/fix/deprecated-nodejs-usage-in-action
fix: deprecated `Node.js` version in action
2024-10-09 13:44:23 -04:00
b4a0a984a0 Merge branch 'main' into fix/deprecated-nodejs-usage-in-action 2024-10-09 13:29:53 -04:00
b4b15b8c7c Merge pull request #632 from actions/joshmgross/undo-dependency-changes
Undo indirect dependency updates from #627
2024-10-09 13:16:31 -04:00
92b01ebffa Undo indirect dependency updates from #627 2024-10-09 12:35:22 -04:00
84480863f2 Merge pull request #627 from actions/robherley/v4.4.2
Bump `@actions/artifact` to 2.1.11
2024-10-08 14:15:05 -04:00
b1d4642b69 add explicit relative and absolute symlinks to workflow 2024-10-08 13:39:45 -04:00
d50e66084c bump version 2024-10-08 13:35:54 -04:00
aabe6f8050 build with @actions/artifact v2.1.11 2024-10-08 12:46:18 -04:00
a954e16c38 fix: deprecated Node.js version in action 2024-06-17 13:25:23 -07:00
a1d85e775a ci: update CodeQL Action before deprecation 2024-06-17 13:00:34 -07:00
13 changed files with 55 additions and 41 deletions

View File

@ -17,11 +17,11 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v4
# Initializes the CodeQL tools for scanning. # Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL - name: Initialize CodeQL
uses: github/codeql-action/init@v2 uses: github/codeql-action/init@v3
# Override language selection by uncommenting this and choosing your languages # Override language selection by uncommenting this and choosing your languages
# with: # with:
# languages: go, javascript, csharp, python, cpp, java # languages: go, javascript, csharp, python, cpp, java
@ -29,7 +29,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below) # If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild - name: Autobuild
uses: github/codeql-action/autobuild@v2 uses: github/codeql-action/autobuild@v3
# Command-line programs to run using the OS shell. # Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl # 📚 https://git.io/JvXDl
@ -43,4 +43,4 @@ jobs:
# make release # make release
- name: Perform CodeQL Analysis - name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2 uses: github/codeql-action/analyze@v3

View File

@ -56,7 +56,8 @@ jobs:
echo "Lorem ipsum dolor sit amet" > path/to/dir-1/file1.txt echo "Lorem ipsum dolor sit amet" > path/to/dir-1/file1.txt
echo "Hello world from file #2" > path/to/dir-2/file2.txt echo "Hello world from file #2" > path/to/dir-2/file2.txt
echo "Hello from a symlinked file" > symlink/original.txt echo "Hello from a symlinked file" > symlink/original.txt
ln -s $(pwd)/symlink/original.txt symlink/file.txt ln -s $(pwd)/symlink/original.txt symlink/abs.txt
ln -s original.txt symlink/rel.txt
shell: bash shell: bash
# Upload a single file artifact # Upload a single file artifact
@ -87,7 +88,9 @@ jobs:
uses: ./ uses: ./
with: with:
name: 'Symlinked-Artifact-${{ matrix.runs-on }}' name: 'Symlinked-Artifact-${{ matrix.runs-on }}'
path: symlink/file.txt path: |
symlink/abs.txt
symlink/rel.txt
# Download Artifact #1 and verify the correctness of the content # Download Artifact #1 and verify the correctness of the content
- name: 'Download artifact #1' - name: 'Download artifact #1'
@ -159,12 +162,21 @@ jobs:
- name: 'Verify symlinked artifact' - name: 'Verify symlinked artifact'
run: | run: |
$file = "from/symlink/file.txt" $abs = "from/symlink/abs.txt"
if(!(Test-Path -path $file)) if(!(Test-Path -path $abs))
{ {
Write-Error "Expected file does not exist" Write-Error "Expected file does not exist"
} }
if(!((Get-Content $file) -ceq "Hello from a symlinked file")) if(!((Get-Content $abs) -ceq "Hello from a symlinked file"))
{
Write-Error "File contents of downloaded artifact are incorrect"
}
$rel = "from/symlink/rel.txt"
if(!(Test-Path -path $rel))
{
Write-Error "Expected file does not exist"
}
if(!((Get-Content $rel) -ceq "Hello from a symlinked file"))
{ {
Write-Error "File contents of downloaded artifact are incorrect" Write-Error "File contents of downloaded artifact are incorrect"
} }

View File

@ -1,9 +1,9 @@
--- ---
name: "@actions/artifact" name: "@actions/artifact"
version: 2.1.10 version: 2.2.0
type: npm type: npm
summary: summary: Actions artifact lib
homepage: homepage: https://github.com/actions/toolkit/tree/main/packages/artifact
license: mit license: mit
licenses: licenses:
- sources: LICENSE.md - sources: LICENSE.md

View File

@ -122,6 +122,7 @@ For assistance with breaking changes, see [MIGRATION.md](docs/MIGRATION.md).
| - | - | - | | - | - | - |
| `artifact-id` | GitHub ID of an Artifact, can be used by the REST API | `1234` | | `artifact-id` | GitHub ID of an Artifact, can be used by the REST API | `1234` |
| `artifact-url` | URL to download an Artifact. Can be used in many scenarios such as linking to artifacts in issues or pull requests. Users must be logged-in in order for this URL to work. This URL is valid as long as the artifact has not expired or the artifact, run or repository have not been deleted | `https://github.com/example-org/example-repo/actions/runs/1/artifacts/1234` | | `artifact-url` | URL to download an Artifact. Can be used in many scenarios such as linking to artifacts in issues or pull requests. Users must be logged-in in order for this URL to work. This URL is valid as long as the artifact has not expired or the artifact, run or repository have not been deleted | `https://github.com/example-org/example-repo/actions/runs/1/artifacts/1234` |
| `artifact-digest` | SHA-256 digest of an Artifact | 0fde654d4c6e659b45783a725dc92f1bfb0baa6c2de64b34e814dc206ff4aaaf |
## Examples ## Examples

View File

@ -60,7 +60,8 @@ describe('upload', () => {
jest.spyOn(artifact, 'uploadArtifact').mockResolvedValue({ jest.spyOn(artifact, 'uploadArtifact').mockResolvedValue({
size: 123, size: 123,
id: 1337 id: 1337,
digest: 'facefeed'
}) })
}) })
@ -95,6 +96,7 @@ describe('upload', () => {
await run() await run()
expect(core.setOutput).toHaveBeenCalledWith('artifact-id', 1337) expect(core.setOutput).toHaveBeenCalledWith('artifact-id', 1337)
expect(core.setOutput).toHaveBeenCalledWith('artifact-digest', 'facefeed')
expect(core.setOutput).toHaveBeenCalledWith( expect(core.setOutput).toHaveBeenCalledWith(
'artifact-url', 'artifact-url',
`${github.context.serverUrl}/${github.context.repo.owner}/${ `${github.context.serverUrl}/${github.context.repo.owner}/${

View File

@ -61,6 +61,9 @@ outputs:
This URL will be valid for as long as the artifact exists and the workflow run and repository exists. Once an artifact has expired this URL will no longer work. This URL will be valid for as long as the artifact exists and the workflow run and repository exists. Once an artifact has expired this URL will no longer work.
Common uses cases for such a download URL can be adding download links to artifacts in descriptions or comments on pull requests or issues. Common uses cases for such a download URL can be adding download links to artifacts in descriptions or comments on pull requests or issues.
artifact-digest:
description: >
SHA-256 digest for the artifact that was just uploaded. Empty if the artifact upload failed.
runs: runs:
using: 'node20' using: 'node20'
main: 'dist/upload/index.js' main: 'dist/upload/index.js'

6
dist/merge/index.js vendored
View File

@ -3606,6 +3606,7 @@ function uploadArtifact(name, files, rootDirectory, options) {
core.info(`Artifact ${name}.zip successfully finalized. Artifact ID ${artifactId}`); core.info(`Artifact ${name}.zip successfully finalized. Artifact ID ${artifactId}`);
return { return {
size: uploadResult.uploadSize, size: uploadResult.uploadSize,
digest: uploadResult.sha256Hash,
id: Number(artifactId) id: Number(artifactId)
}; };
}); });
@ -3814,7 +3815,7 @@ function createZipUploadStream(uploadSpecification, compressionLevel = exports.D
// Check if symlink and resolve the source path // Check if symlink and resolve the source path
let sourcePath = file.sourcePath; let sourcePath = file.sourcePath;
if (file.stats.isSymbolicLink()) { if (file.stats.isSymbolicLink()) {
sourcePath = yield (0, promises_1.readlink)(file.sourcePath); sourcePath = yield (0, promises_1.realpath)(file.sourcePath);
} }
// Add the file to the zip // Add the file to the zip
zip.file(sourcePath, { zip.file(sourcePath, {
@ -127615,6 +127616,7 @@ function uploadArtifact(artifactName, filesToUpload, rootDirectory, options) {
const uploadResponse = yield artifact_1.default.uploadArtifact(artifactName, filesToUpload, rootDirectory, options); const uploadResponse = yield artifact_1.default.uploadArtifact(artifactName, filesToUpload, rootDirectory, options);
core.info(`Artifact ${artifactName} has been successfully uploaded! Final size is ${uploadResponse.size} bytes. Artifact ID is ${uploadResponse.id}`); core.info(`Artifact ${artifactName} has been successfully uploaded! Final size is ${uploadResponse.size} bytes. Artifact ID is ${uploadResponse.id}`);
core.setOutput('artifact-id', uploadResponse.id); core.setOutput('artifact-id', uploadResponse.id);
core.setOutput('artifact-digest', uploadResponse.digest);
const repository = github.context.repo; const repository = github.context.repo;
const artifactURL = `${github.context.serverUrl}/${repository.owner}/${repository.repo}/actions/runs/${github.context.runId}/artifacts/${uploadResponse.id}`; const artifactURL = `${github.context.serverUrl}/${repository.owner}/${repository.repo}/actions/runs/${github.context.runId}/artifacts/${uploadResponse.id}`;
core.info(`Artifact download URL: ${artifactURL}`); core.info(`Artifact download URL: ${artifactURL}`);
@ -137604,7 +137606,7 @@ module.exports = index;
/***/ ((module) => { /***/ ((module) => {
"use strict"; "use strict";
module.exports = JSON.parse('{"name":"@actions/artifact","version":"2.1.10","preview":true,"description":"Actions artifact lib","keywords":["github","actions","artifact"],"homepage":"https://github.com/actions/toolkit/tree/main/packages/artifact","license":"MIT","main":"lib/artifact.js","types":"lib/artifact.d.ts","directories":{"lib":"lib","test":"__tests__"},"files":["lib","!.DS_Store"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/actions/toolkit.git","directory":"packages/artifact"},"scripts":{"audit-moderate":"npm install && npm audit --json --audit-level=moderate > audit.json","test":"cd ../../ && npm run test ./packages/artifact","bootstrap":"cd ../../ && npm run bootstrap","tsc-run":"tsc","tsc":"npm run bootstrap && npm run tsc-run","gen:docs":"typedoc --plugin typedoc-plugin-markdown --out docs/generated src/artifact.ts --githubPages false --readme none"},"bugs":{"url":"https://github.com/actions/toolkit/issues"},"dependencies":{"@actions/core":"^1.10.0","@actions/github":"^5.1.1","@actions/http-client":"^2.1.0","@azure/storage-blob":"^12.15.0","@octokit/core":"^3.5.1","@octokit/plugin-request-log":"^1.0.4","@octokit/plugin-retry":"^3.0.9","@octokit/request-error":"^5.0.0","@protobuf-ts/plugin":"^2.2.3-alpha.1","archiver":"^7.0.1","crypto":"^1.0.1","jwt-decode":"^3.1.2","twirp-ts":"^2.5.0","unzip-stream":"^0.3.1"},"devDependencies":{"@types/archiver":"^5.3.2","@types/unzip-stream":"^0.3.4","typedoc":"^0.25.4","typedoc-plugin-markdown":"^3.17.1","typescript":"^5.2.2"}}'); module.exports = JSON.parse('{"name":"@actions/artifact","version":"2.2.0","preview":true,"description":"Actions artifact lib","keywords":["github","actions","artifact"],"homepage":"https://github.com/actions/toolkit/tree/main/packages/artifact","license":"MIT","main":"lib/artifact.js","types":"lib/artifact.d.ts","directories":{"lib":"lib","test":"__tests__"},"files":["lib","!.DS_Store"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/actions/toolkit.git","directory":"packages/artifact"},"scripts":{"audit-moderate":"npm install && npm audit --json --audit-level=moderate > audit.json","test":"cd ../../ && npm run test ./packages/artifact","bootstrap":"cd ../../ && npm run bootstrap","tsc-run":"tsc","tsc":"npm run bootstrap && npm run tsc-run","gen:docs":"typedoc --plugin typedoc-plugin-markdown --out docs/generated src/artifact.ts --githubPages false --readme none"},"bugs":{"url":"https://github.com/actions/toolkit/issues"},"dependencies":{"@actions/core":"^1.10.0","@actions/github":"^5.1.1","@actions/http-client":"^2.1.0","@azure/storage-blob":"^12.15.0","@octokit/core":"^3.5.1","@octokit/plugin-request-log":"^1.0.4","@octokit/plugin-retry":"^3.0.9","@octokit/request-error":"^5.0.0","@protobuf-ts/plugin":"^2.2.3-alpha.1","archiver":"^7.0.1","jwt-decode":"^3.1.2","twirp-ts":"^2.5.0","unzip-stream":"^0.3.1"},"devDependencies":{"@types/archiver":"^5.3.2","@types/unzip-stream":"^0.3.4","typedoc":"^0.25.4","typedoc-plugin-markdown":"^3.17.1","typescript":"^5.2.2"}}');
/***/ }), /***/ }),

View File

@ -3606,6 +3606,7 @@ function uploadArtifact(name, files, rootDirectory, options) {
core.info(`Artifact ${name}.zip successfully finalized. Artifact ID ${artifactId}`); core.info(`Artifact ${name}.zip successfully finalized. Artifact ID ${artifactId}`);
return { return {
size: uploadResult.uploadSize, size: uploadResult.uploadSize,
digest: uploadResult.sha256Hash,
id: Number(artifactId) id: Number(artifactId)
}; };
}); });
@ -3814,7 +3815,7 @@ function createZipUploadStream(uploadSpecification, compressionLevel = exports.D
// Check if symlink and resolve the source path // Check if symlink and resolve the source path
let sourcePath = file.sourcePath; let sourcePath = file.sourcePath;
if (file.stats.isSymbolicLink()) { if (file.stats.isSymbolicLink()) {
sourcePath = yield (0, promises_1.readlink)(file.sourcePath); sourcePath = yield (0, promises_1.realpath)(file.sourcePath);
} }
// Add the file to the zip // Add the file to the zip
zip.file(sourcePath, { zip.file(sourcePath, {
@ -127370,6 +127371,7 @@ function uploadArtifact(artifactName, filesToUpload, rootDirectory, options) {
const uploadResponse = yield artifact_1.default.uploadArtifact(artifactName, filesToUpload, rootDirectory, options); const uploadResponse = yield artifact_1.default.uploadArtifact(artifactName, filesToUpload, rootDirectory, options);
core.info(`Artifact ${artifactName} has been successfully uploaded! Final size is ${uploadResponse.size} bytes. Artifact ID is ${uploadResponse.id}`); core.info(`Artifact ${artifactName} has been successfully uploaded! Final size is ${uploadResponse.size} bytes. Artifact ID is ${uploadResponse.id}`);
core.setOutput('artifact-id', uploadResponse.id); core.setOutput('artifact-id', uploadResponse.id);
core.setOutput('artifact-digest', uploadResponse.digest);
const repository = github.context.repo; const repository = github.context.repo;
const artifactURL = `${github.context.serverUrl}/${repository.owner}/${repository.repo}/actions/runs/${github.context.runId}/artifacts/${uploadResponse.id}`; const artifactURL = `${github.context.serverUrl}/${repository.owner}/${repository.repo}/actions/runs/${github.context.runId}/artifacts/${uploadResponse.id}`;
core.info(`Artifact download URL: ${artifactURL}`); core.info(`Artifact download URL: ${artifactURL}`);
@ -137614,7 +137616,7 @@ module.exports = index;
/***/ ((module) => { /***/ ((module) => {
"use strict"; "use strict";
module.exports = JSON.parse('{"name":"@actions/artifact","version":"2.1.10","preview":true,"description":"Actions artifact lib","keywords":["github","actions","artifact"],"homepage":"https://github.com/actions/toolkit/tree/main/packages/artifact","license":"MIT","main":"lib/artifact.js","types":"lib/artifact.d.ts","directories":{"lib":"lib","test":"__tests__"},"files":["lib","!.DS_Store"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/actions/toolkit.git","directory":"packages/artifact"},"scripts":{"audit-moderate":"npm install && npm audit --json --audit-level=moderate > audit.json","test":"cd ../../ && npm run test ./packages/artifact","bootstrap":"cd ../../ && npm run bootstrap","tsc-run":"tsc","tsc":"npm run bootstrap && npm run tsc-run","gen:docs":"typedoc --plugin typedoc-plugin-markdown --out docs/generated src/artifact.ts --githubPages false --readme none"},"bugs":{"url":"https://github.com/actions/toolkit/issues"},"dependencies":{"@actions/core":"^1.10.0","@actions/github":"^5.1.1","@actions/http-client":"^2.1.0","@azure/storage-blob":"^12.15.0","@octokit/core":"^3.5.1","@octokit/plugin-request-log":"^1.0.4","@octokit/plugin-retry":"^3.0.9","@octokit/request-error":"^5.0.0","@protobuf-ts/plugin":"^2.2.3-alpha.1","archiver":"^7.0.1","crypto":"^1.0.1","jwt-decode":"^3.1.2","twirp-ts":"^2.5.0","unzip-stream":"^0.3.1"},"devDependencies":{"@types/archiver":"^5.3.2","@types/unzip-stream":"^0.3.4","typedoc":"^0.25.4","typedoc-plugin-markdown":"^3.17.1","typescript":"^5.2.2"}}'); module.exports = JSON.parse('{"name":"@actions/artifact","version":"2.2.0","preview":true,"description":"Actions artifact lib","keywords":["github","actions","artifact"],"homepage":"https://github.com/actions/toolkit/tree/main/packages/artifact","license":"MIT","main":"lib/artifact.js","types":"lib/artifact.d.ts","directories":{"lib":"lib","test":"__tests__"},"files":["lib","!.DS_Store"],"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/actions/toolkit.git","directory":"packages/artifact"},"scripts":{"audit-moderate":"npm install && npm audit --json --audit-level=moderate > audit.json","test":"cd ../../ && npm run test ./packages/artifact","bootstrap":"cd ../../ && npm run bootstrap","tsc-run":"tsc","tsc":"npm run bootstrap && npm run tsc-run","gen:docs":"typedoc --plugin typedoc-plugin-markdown --out docs/generated src/artifact.ts --githubPages false --readme none"},"bugs":{"url":"https://github.com/actions/toolkit/issues"},"dependencies":{"@actions/core":"^1.10.0","@actions/github":"^5.1.1","@actions/http-client":"^2.1.0","@azure/storage-blob":"^12.15.0","@octokit/core":"^3.5.1","@octokit/plugin-request-log":"^1.0.4","@octokit/plugin-retry":"^3.0.9","@octokit/request-error":"^5.0.0","@protobuf-ts/plugin":"^2.2.3-alpha.1","archiver":"^7.0.1","jwt-decode":"^3.1.2","twirp-ts":"^2.5.0","unzip-stream":"^0.3.1"},"devDependencies":{"@types/archiver":"^5.3.2","@types/unzip-stream":"^0.3.4","typedoc":"^0.25.4","typedoc-plugin-markdown":"^3.17.1","typescript":"^5.2.2"}}');
/***/ }), /***/ }),

View File

@ -65,6 +65,7 @@ For most cases, this may not be the most efficient solution. See [the migration
| - | - | - | | - | - | - |
| `artifact-id` | GitHub ID of an Artifact, can be used by the REST API | `1234` | | `artifact-id` | GitHub ID of an Artifact, can be used by the REST API | `1234` |
| `artifact-url` | URL to download an Artifact. Can be used in many scenarios such as linking to artifacts in issues or pull requests. Users must be logged-in in order for this URL to work. This URL is valid as long as the artifact has not expired or the artifact, run or repository have not been deleted | `https://github.com/example-org/example-repo/actions/runs/1/artifacts/1234` | | `artifact-url` | URL to download an Artifact. Can be used in many scenarios such as linking to artifacts in issues or pull requests. Users must be logged-in in order for this URL to work. This URL is valid as long as the artifact has not expired or the artifact, run or repository have not been deleted | `https://github.com/example-org/example-repo/actions/runs/1/artifacts/1234` |
| `artifact-digest` | SHA-256 digest of an Artifact | 0fde654d4c6e659b45783a725dc92f1bfb0baa6c2de64b34e814dc206ff4aaaf |
## Examples ## Examples

View File

@ -57,6 +57,9 @@ outputs:
This URL will be valid for as long as the artifact exists and the workflow run and repository exists. Once an artifact has expired this URL will no longer work. This URL will be valid for as long as the artifact exists and the workflow run and repository exists. Once an artifact has expired this URL will no longer work.
Common uses cases for such a download URL can be adding download links to artifacts in descriptions or comments on pull requests or issues. Common uses cases for such a download URL can be adding download links to artifacts in descriptions or comments on pull requests or issues.
artifact-digest:
description: >
SHA-256 digest for the artifact that was just uploaded. Empty if the artifact upload failed.
runs: runs:
using: 'node20' using: 'node20'
main: '../dist/merge/index.js' main: '../dist/merge/index.js'

31
package-lock.json generated
View File

@ -1,15 +1,15 @@
{ {
"name": "upload-artifact", "name": "upload-artifact",
"version": "4.4.1", "version": "4.5.0",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "upload-artifact", "name": "upload-artifact",
"version": "4.4.1", "version": "4.5.0",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@actions/artifact": "^2.1.10", "@actions/artifact": "^2.2.0",
"@actions/core": "^1.11.1", "@actions/core": "^1.11.1",
"@actions/github": "^6.0.0", "@actions/github": "^6.0.0",
"@actions/glob": "^0.5.0", "@actions/glob": "^0.5.0",
@ -34,9 +34,9 @@
} }
}, },
"node_modules/@actions/artifact": { "node_modules/@actions/artifact": {
"version": "2.1.10", "version": "2.2.0",
"resolved": "https://registry.npmjs.org/@actions/artifact/-/artifact-2.1.10.tgz", "resolved": "https://registry.npmjs.org/@actions/artifact/-/artifact-2.2.0.tgz",
"integrity": "sha512-3c6DP+ZiTgHuXYaNO3W0MnoK//ZfBnJEam1SpOZuR2epNWO7m8Wh72IdhiKMib4DMyNNt8924TOUaR2X4cRPHQ==", "integrity": "sha512-nDEyBsphN148zHe6ihq1a/UX92MDgC2GS9XmeFx2xs/wztZxzARYllviiP5U1nTDp2n9dEhnUig9RP9eSDcU5g==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@actions/core": "^1.10.0", "@actions/core": "^1.10.0",
@ -49,7 +49,6 @@
"@octokit/request-error": "^5.0.0", "@octokit/request-error": "^5.0.0",
"@protobuf-ts/plugin": "^2.2.3-alpha.1", "@protobuf-ts/plugin": "^2.2.3-alpha.1",
"archiver": "^7.0.1", "archiver": "^7.0.1",
"crypto": "^1.0.1",
"jwt-decode": "^3.1.2", "jwt-decode": "^3.1.2",
"twirp-ts": "^2.5.0", "twirp-ts": "^2.5.0",
"unzip-stream": "^0.3.1" "unzip-stream": "^0.3.1"
@ -3240,12 +3239,6 @@
"which": "^2.0.1" "which": "^2.0.1"
} }
}, },
"node_modules/crypto": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/crypto/-/crypto-1.0.1.tgz",
"integrity": "sha512-VxBKmeNcqQdiUQUW2Tzq0t377b54N2bMtXO/qiLa+6eRRmmC4qT3D4OnTGoT/U6O9aklQ/jTwbOtRMTTY8G0Ig==",
"deprecated": "This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in."
},
"node_modules/damerau-levenshtein": { "node_modules/damerau-levenshtein": {
"version": "1.0.8", "version": "1.0.8",
"resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz", "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz",
@ -7916,9 +7909,9 @@
}, },
"dependencies": { "dependencies": {
"@actions/artifact": { "@actions/artifact": {
"version": "2.1.10", "version": "2.2.0",
"resolved": "https://registry.npmjs.org/@actions/artifact/-/artifact-2.1.10.tgz", "resolved": "https://registry.npmjs.org/@actions/artifact/-/artifact-2.2.0.tgz",
"integrity": "sha512-3c6DP+ZiTgHuXYaNO3W0MnoK//ZfBnJEam1SpOZuR2epNWO7m8Wh72IdhiKMib4DMyNNt8924TOUaR2X4cRPHQ==", "integrity": "sha512-nDEyBsphN148zHe6ihq1a/UX92MDgC2GS9XmeFx2xs/wztZxzARYllviiP5U1nTDp2n9dEhnUig9RP9eSDcU5g==",
"requires": { "requires": {
"@actions/core": "^1.10.0", "@actions/core": "^1.10.0",
"@actions/github": "^5.1.1", "@actions/github": "^5.1.1",
@ -7930,7 +7923,6 @@
"@octokit/request-error": "^5.0.0", "@octokit/request-error": "^5.0.0",
"@protobuf-ts/plugin": "^2.2.3-alpha.1", "@protobuf-ts/plugin": "^2.2.3-alpha.1",
"archiver": "^7.0.1", "archiver": "^7.0.1",
"crypto": "^1.0.1",
"jwt-decode": "^3.1.2", "jwt-decode": "^3.1.2",
"twirp-ts": "^2.5.0", "twirp-ts": "^2.5.0",
"unzip-stream": "^0.3.1" "unzip-stream": "^0.3.1"
@ -10395,11 +10387,6 @@
"which": "^2.0.1" "which": "^2.0.1"
} }
}, },
"crypto": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/crypto/-/crypto-1.0.1.tgz",
"integrity": "sha512-VxBKmeNcqQdiUQUW2Tzq0t377b54N2bMtXO/qiLa+6eRRmmC4qT3D4OnTGoT/U6O9aklQ/jTwbOtRMTTY8G0Ig=="
},
"damerau-levenshtein": { "damerau-levenshtein": {
"version": "1.0.8", "version": "1.0.8",
"resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz", "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz",

View File

@ -1,6 +1,6 @@
{ {
"name": "upload-artifact", "name": "upload-artifact",
"version": "4.4.1", "version": "4.5.0",
"description": "Upload an Actions Artifact in a workflow run", "description": "Upload an Actions Artifact in a workflow run",
"main": "dist/upload/index.js", "main": "dist/upload/index.js",
"scripts": { "scripts": {
@ -29,7 +29,7 @@
}, },
"homepage": "https://github.com/actions/upload-artifact#readme", "homepage": "https://github.com/actions/upload-artifact#readme",
"dependencies": { "dependencies": {
"@actions/artifact": "^2.1.10", "@actions/artifact": "^2.2.0",
"@actions/core": "^1.11.1", "@actions/core": "^1.11.1",
"@actions/github": "^6.0.0", "@actions/github": "^6.0.0",
"@actions/glob": "^0.5.0", "@actions/glob": "^0.5.0",

View File

@ -19,6 +19,7 @@ export async function uploadArtifact(
`Artifact ${artifactName} has been successfully uploaded! Final size is ${uploadResponse.size} bytes. Artifact ID is ${uploadResponse.id}` `Artifact ${artifactName} has been successfully uploaded! Final size is ${uploadResponse.size} bytes. Artifact ID is ${uploadResponse.id}`
) )
core.setOutput('artifact-id', uploadResponse.id) core.setOutput('artifact-id', uploadResponse.id)
core.setOutput('artifact-digest', uploadResponse.digest)
const repository = github.context.repo const repository = github.context.repo
const artifactURL = `${github.context.serverUrl}/${repository.owner}/${repository.repo}/actions/runs/${github.context.runId}/artifacts/${uploadResponse.id}` const artifactURL = `${github.context.serverUrl}/${repository.owner}/${repository.repo}/actions/runs/${github.context.runId}/artifacts/${uploadResponse.id}`