Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: actions/upload-artifact
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.0.0
Choose a base ref
...
head repository: actions/upload-artifact
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.0.1
Choose a head ref
  • 11 commits
  • 20 files changed
  • 5 contributors

Commits on Jan 16, 2020

  1. Update README.md

    konradpabjan authored Jan 16, 2020
    Copy the full SHA
    ceafd8b View commit details
  2. Update README.md

    konradpabjan authored Jan 16, 2020
    Copy the full SHA
    8eb149d View commit details

Commits on Mar 19, 2020

  1. Copy the full SHA
    1283ca1 View commit details

Commits on Apr 28, 2020

  1. V2 Upload Artifact (#70)

    * V2 Preview (#54)
    
    * V2 Upload Artifact
    
    * Improve logs
    
    * Update release
    
    * Update test.yml
    
    * Update test.yml
    
    * Update test.yml
    
    * @actions/artifact v0.2.0 package
    
    * Add extra YAML test
    
    * Extra Documentation
    
    * Update README.md
    
    * Update README.md
    
    * Update NPM packages
    
    * Update to @actions/artifact 0.3.1
    
    * Update readme from v2 preview to v2
    
    * Add .gitattributes
    
    * Misc Updates
    
    * macOS to macos
    
    * Update YAML so only push events trigger on the master branch
    konradpabjan authored Apr 28, 2020
    Copy the full SHA
    e7eefc4 View commit details

Commits on May 8, 2020

  1. Copy the full SHA
    e59920f View commit details

Commits on May 11, 2020

  1. Bump @actions/http-client from 1.0.7 to 1.0.8 (#73)

    Bumps [@actions/http-client](https://github.com/actions/http-client) from 1.0.7 to 1.0.8.
    - [Release notes](https://github.com/actions/http-client/releases)
    - [Changelog](https://github.com/actions/http-client/blob/master/RELEASES.md)
    - [Commits](https://github.com/actions/http-client/commits)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored May 11, 2020
    Copy the full SHA
    4a30538 View commit details
  2. Copy the full SHA
    1c797a4 View commit details
  3. Copy the full SHA
    d6636db View commit details
  4. Merge pull request #78 from actions/joshmgross/add-code-scanning

    Create codeql-analysis.yml
    joshmgross authored May 11, 2020
    Copy the full SHA
    f729db2 View commit details

Commits on May 13, 2020

  1. chore: Remove CodeQL strategy (#79)

    The job isn't using a matrix, so this value isn't allowed
    nschonni authored May 13, 2020
    1
    Copy the full SHA
    9bcc1e2 View commit details

Commits on May 18, 2020

  1. Fix connection errors if a retry is encountered (#82)

    * Use @actions/artifact 0.3.2
    
    * setFailed if certain items don't upload
    
    * Update verion #
    konradpabjan authored May 18, 2020
    Copy the full SHA
    97b7dac View commit details
Showing with 16,535 additions and 13 deletions.
  1. +3 −0 .eslintignore
  2. +19 −0 .eslintrc.json
  3. +1 −0 .gitattributes
  4. +33 −0 .github/ISSUE_TEMPLATE/bug_report.md
  5. +44 −0 .github/workflows/codeql-analysis.yml
  6. +140 −0 .github/workflows/test.yml
  7. +3 −0 .gitignore
  8. +3 −0 .prettierignore
  9. +11 −0 .prettierrc.json
  10. +115 −9 README.md
  11. +289 −0 __tests__/search.test.ts
  12. +4 −4 action.yml
  13. +8,569 −0 dist/index.js
  14. +12 −0 jest.config.js
  15. +7,096 −0 package-lock.json
  16. +51 −0 package.json
  17. +8 −0 src/constants.ts
  18. +69 −0 src/search.ts
  19. +48 −0 src/upload-artifact.ts
  20. +17 −0 tsconfig.json
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules/
lib/
dist/
19 changes: 19 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"env": { "node": true, "jest": true },
"parser": "@typescript-eslint/parser",
"parserOptions": { "ecmaVersion": 9, "sourceType": "module" },
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",
"plugin:prettier/recommended",
"prettier/@typescript-eslint"
],
"rules": {
"@typescript-eslint/no-empty-function": "off"
},
"plugins": ["@typescript-eslint", "jest"]
}
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**Version**
- [ ] V1
- [ ] V2

**Environment**
- [ ] self-hosted
- [ ] Linux
- [ ] Windows
- [ ] Mac

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Run/Repo Url**
If applicable, and if your repo/run is public, please include a URL so it is easier for us to investigate.

**How to reproduce**
If applicable, add information on how to reproduce the problem.

**Additional context**
Add any other context about the problem here.
44 changes: 44 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: "Code scanning - action"

on:
push:
paths-ignore:
- '**.md'
schedule:
- cron: '0 6 * * 3'

jobs:
CodeQL-Build:

# CodeQL runs on ubuntu-latest and windows-latest
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
# Override language selection by uncommenting this and choosing your languages
# with:
# languages: go, javascript, csharp, python, cpp, 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)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
140 changes: 140 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
name: Test
on:
push:
branches:
- master
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'

jobs:

build:
name: Build

strategy:
matrix:
runs-on: [ubuntu-latest, macos-latest, windows-latest]
fail-fast: false

runs-on: ${{ matrix.runs-on }}

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x

- name: npm install
run: npm install

- name: Compile
run: npm run build

- name: npm test
run: npm test

- name: Lint
run: npm run lint

- name: Format
run: npm run format-check

# Test end-to-end by uploading two artifacts and then downloading them
- name: Create artifact files
run: |
mkdir -p path/to/dir-1
mkdir -p path/to/dir-2
mkdir -p path/to/dir-3
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 "This is a going to be a test for a large enough file that should get compressed with GZip. The @actions/artifact package uses GZip to upload files. This text should have a compression ratio greater than 100% so it should get uploaded using GZip" > path/to/dir-3/gzip.txt
# Upload a single file artifact
- name: 'Upload artifact #1'
uses: ./
with:
name: 'Artifact-A'
path: path/to/dir-1/file1.txt

# Upload using a wildcard pattern, name should default to 'artifact' if not provided
- name: 'Upload artifact #2'
uses: ./
with:
path: path/**/dir*/

# Upload a directory that contains a file that will be uploaded with GZip
- name: 'Upload artifact #3'
uses: ./
with:
name: 'GZip-Artifact'
path: path/to/dir-3/

# Verify artifacts. Switch to download-artifact@v2 once it's out of preview

# Download Artifact #1 and verify the correctness of the content
- name: 'Download artifact #1'
uses: actions/download-artifact@v1
with:
name: 'Artifact-A'
path: some/new/path

- name: 'Verify Artifact #1'
run: |
$file = "some/new/path/file1.txt"
if(!(Test-Path -path $file))
{
Write-Error "Expected file does not exist"
}
if(!((Get-Content $file) -ceq "Lorem ipsum dolor sit amet"))
{
Write-Error "File contents of downloaded artifact are incorrect"
}
shell: pwsh

# Download Artifact #2 and verify the correctness of the content
- name: 'Download artifact #2'
uses: actions/download-artifact@v1
with:
name: 'artifact'
path: some/other/path

- name: 'Verify Artifact #2'
run: |
$file1 = "some/other/path/to/dir-1/file1.txt"
$file2 = "some/other/path/to/dir-2/file2.txt"
if(!(Test-Path -path $file1) -or !(Test-Path -path $file2))
{
Write-Error "Expected files do not exist"
}
if(!((Get-Content $file1) -ceq "Lorem ipsum dolor sit amet") -or !((Get-Content $file2) -ceq "Hello world from file #2"))
{
Write-Error "File contents of downloaded artifacts are incorrect"
}
shell: pwsh

# Download Artifact #3 and verify the correctness of the content
- name: 'Download artifact #3'
uses: actions/download-artifact@v1
with:
name: 'GZip-Artifact'
path: gzip/artifact/path

# Because a directory was used as input during the upload the parent directories, path/to/dir-3/, should not be included in the uploaded artifact
- name: 'Verify Artifact #3'
run: |
$gzipFile = "gzip/artifact/path/gzip.txt"
if(!(Test-Path -path $gzipFile))
{
Write-Error "Expected file do not exist"
}
if(!((Get-Content $gzipFile) -ceq "This is a going to be a test for a large enough file that should get compressed with GZip. The @actions/artifact package uses GZip to upload files. This text should have a compression ratio greater than 100% so it should get uploaded using GZip"))
{
Write-Error "File contents of downloaded artifact is incorrect"
}
shell: pwsh
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules/
lib/
__tests__/_temp/
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dist/
lib/
node_modules/
11 changes: 11 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"semi": false,
"singleQuote": true,
"trailingComma": "none",
"bracketSpacing": false,
"arrowParens": "avoid",
"parser": "typescript"
}
Loading