Compare commits

..
1 Commits
Author SHA1 Message Date
Francesco Renzi cbed621e49 Upgrade @actions/core to 1.10.0 for v2 (#210)
* Upgrade @actions/core to 1.10.0

* update dist/index.js
2023-03-08 16:06:44 -05:00
21 changed files with 8651 additions and 11563 deletions
-6
View File
@@ -1,6 +0,0 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node
{
"name": "@actions/download-artifact",
"image": "mcr.microsoft.com/devcontainers/typescript-node:0-16"
}
+5 -6
View File
@@ -22,13 +22,12 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v2
- name: Setup Node 16 - name: Set Node.js 12.x
uses: actions/setup-node@v3 uses: actions/setup-node@v1
with: with:
node-version: 16.x node-version: 12.x
cache: 'npm'
- name: Install dependencies - name: Install dependencies
run: npm ci run: npm ci
@@ -46,7 +45,7 @@ jobs:
id: diff id: diff
# If index.js was different than expected, upload the expected version as an artifact # If index.js was different than expected, upload the expected version as an artifact
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v2
if: ${{ failure() && steps.diff.conclusion == 'failure' }} if: ${{ failure() && steps.diff.conclusion == 'failure' }}
with: with:
name: dist name: dist
+4 -4
View File
@@ -20,11 +20,11 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v2
# 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@v1
# 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
@@ -32,7 +32,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@v1
# ℹ️ 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
@@ -46,4 +46,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@v1
+1 -1
View File
@@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
name: Check licenses name: Check licenses
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v2
- run: npm ci - run: npm ci
- name: Install licensed - name: Install licensed
run: | run: |
@@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Update the ${{ env.TAG_NAME }} tag - name: Update the ${{ env.TAG_NAME }} tag
uses: actions/publish-action@v0.2.1 uses: actions/publish-action@v0.1.0
with: with:
source-tag: ${{ env.TAG_NAME }} source-tag: ${{ env.TAG_NAME }}
slack-webhook: ${{ secrets.SLACK_WEBHOOK }} slack-webhook: ${{ secrets.SLACK_WEBHOOK }}
+4 -6
View File
@@ -21,14 +21,12 @@ jobs:
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v2
# using node 16 since that is what the latest version of the runner ships with - name: Set Node.js 12.x
- name: Setup Node 16 uses: actions/setup-node@v1
uses: actions/setup-node@v3
with: with:
node-version: 16.x node-version: 12.x
cache: 'npm'
- name: npm install - name: npm install
run: npm install run: npm install
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+16 -16
View File
@@ -1,4 +1,4 @@
# Download-Artifact v3 # Download-Artifact v2
This downloads artifacts from your build This downloads artifacts from your build
@@ -10,7 +10,7 @@ See also [upload-artifact](https://github.com/actions/upload-artifact).
- Output parameter for the download path - Output parameter for the download path
- Port entire action to typescript from a runner plugin so it is easier to collaborate and accept contributions - Port entire action to typescript from a runner plugin so it is easier to collaborate and accept contributions
Refer [here](https://github.com/actions/download-artifact/tree/v2) for the previous version Refer [here](https://github.com/actions/download-artifact/tree/v1) for the previous version
# Usage # Usage
@@ -21,9 +21,9 @@ See [action.yml](action.yml)
Basic (download to the current working directory): Basic (download to the current working directory):
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v2
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v2
with: with:
name: my-artifact name: my-artifact
@@ -34,9 +34,9 @@ steps:
Download to a specific directory: Download to a specific directory:
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v2
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v2
with: with:
name: my-artifact name: my-artifact
path: path/to/artifact path: path/to/artifact
@@ -48,13 +48,13 @@ steps:
Basic tilde expansion is supported for the `path` input: Basic tilde expansion is supported for the `path` input:
```yaml ```yaml
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v2
with: with:
name: my-artifact name: my-artifact
path: ~/download/path path: ~/download/path
``` ```
## Compatibility between `v1` and `v2`/`v3` ## Compatibility between `v1` and `v2`
When using `download-artifact@v1`, a directory denoted by the name of the artifact would be created if the `path` input was not provided. All of the contents would be downloaded to this directory. When using `download-artifact@v1`, a directory denoted by the name of the artifact would be created if the `path` input was not provided. All of the contents would be downloaded to this directory.
``` ```
@@ -63,13 +63,13 @@ When using `download-artifact@v1`, a directory denoted by the name of the artifa
... contents of my-artifact ... contents of my-artifact
``` ```
With `v2` and `v3`, when an artifact is specified by the `name` input, there is no longer an extra directory that is created if the `path` input is not provided. All the contents are downloaded to the current working directory. With `v2`, when an artifact is specified by the `name` input, there is no longer an extra directory that is created if the `path` input is not provided. All the contents are downloaded to the current working directory.
``` ```
current/working/directory/ current/working/directory/
... contents of my-artifact ... contents of my-artifact
``` ```
To maintain the same behavior for `v2` and `v3`, you can set the `path` to the name of the artifact so an extra directory gets created. To maintain the same behavior for `v2`, you can set the `path` to the name of the artifact so an extra directory gets created.
``` ```
- uses: actions/download-artifact@v2 - uses: actions/download-artifact@v2
with: with:
@@ -93,9 +93,9 @@ Example, if there are two artifacts `Artifact-A` and `Artifact-B`, and the direc
Download all artifacts to a specific directory Download all artifacts to a specific directory
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v2
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v2
with: with:
path: path/to/artifacts path: path/to/artifacts
@@ -107,9 +107,9 @@ steps:
Download all artifacts to the current working directory Download all artifacts to the current working directory
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v2
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v2
- name: Display structure of downloaded files - name: Display structure of downloaded files
run: ls -R run: ls -R
@@ -121,9 +121,9 @@ The `download-path` step output contains information regarding where the artifac
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v2
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v2
id: download id: download
with: with:
name: 'my-artifact' name: 'my-artifact'
+2 -2
View File
@@ -9,5 +9,5 @@ inputs:
description: 'Destination path' description: 'Destination path'
required: false required: false
runs: runs:
using: 'node20' using: 'node12'
main: 'dist/index.js' main: 'dist/index.js'
+8365 -8159
View File
File diff suppressed because it is too large Load Diff
+249 -3358
View File
File diff suppressed because it is too large Load Diff
+4 -4
View File
@@ -1,6 +1,6 @@
{ {
"name": "download-artifact", "name": "download-artifact",
"version": "3.0.0", "version": "2.0.0",
"description": "Download a build artifact that was previously uploaded in the workflow by the upload-artifact action", "description": "Download a build artifact that was previously uploaded in the workflow by the upload-artifact action",
"main": "dist/index.js", "main": "dist/index.js",
"scripts": { "scripts": {
@@ -28,13 +28,13 @@
}, },
"homepage": "https://github.com/actions/download-artifact#readme", "homepage": "https://github.com/actions/download-artifact#readme",
"dependencies": { "dependencies": {
"@actions/artifact": "^1.1.1", "@actions/artifact": "^0.6.0",
"@actions/core": "^1.10.0" "@actions/core": "^1.10.0"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^12.12.6", "@types/node": "^12.12.6",
"@typescript-eslint/eslint-plugin": "^5.40.1", "@typescript-eslint/parser": "^2.30.0",
"@vercel/ncc": "^0.33.4", "@zeit/ncc": "^0.22.1",
"concurrently": "^5.2.0", "concurrently": "^5.2.0",
"eslint": "^7.4.0", "eslint": "^7.4.0",
"eslint-plugin-github": "^4.1.1", "eslint-plugin-github": "^4.1.1",