mirror of
https://gitea.com/actions/upload-artifact.git
synced 2024-11-12 19:55:58 +01:00
chore: expand prettier and ESLint globs
This commit is contained in:
parent
055b8b3f04
commit
d9291ac874
17 changed files with 300 additions and 301 deletions
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"env": { "node": true, "jest": true },
|
||||
"env": {"node": true, "jest": true},
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"parserOptions": { "ecmaVersion": 9, "sourceType": "module" },
|
||||
"parserOptions": {"ecmaVersion": 9, "sourceType": "module"},
|
||||
"extends": [
|
||||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/eslint-recommended",
|
||||
|
|
2
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
2
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
|
@ -1,4 +1,4 @@
|
|||
name: "🐛 Bug report"
|
||||
name: '🐛 Bug report'
|
||||
description: Let us know about a bug!
|
||||
labels: ['bug']
|
||||
title: '[bug]'
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
name: "📚 Documentation issues"
|
||||
name: '📚 Documentation issues'
|
||||
description: Make a suggestion to improve the documentation!
|
||||
labels: ['documentation']
|
||||
title: '[docs]'
|
||||
|
|
2
.github/ISSUE_TEMPLATE/feature-request.yml
vendored
2
.github/ISSUE_TEMPLATE/feature-request.yml
vendored
|
@ -1,4 +1,4 @@
|
|||
name: "🎁 Feature request"
|
||||
name: '🎁 Feature request'
|
||||
description: Suggest a new feature/enhancement!
|
||||
labels: ['enhancement']
|
||||
title: '[feat req]'
|
||||
|
|
8
.github/workflows/codeql-analysis.yml
vendored
8
.github/workflows/codeql-analysis.yml
vendored
|
@ -1,8 +1,9 @@
|
|||
name: "Code scanning - action"
|
||||
name: 'Code scanning - action'
|
||||
|
||||
on:
|
||||
push:
|
||||
branches-ignore: "dependabot/**"
|
||||
branches-ignore:
|
||||
- 'dependabot/**'
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
|
@ -11,7 +12,6 @@ on:
|
|||
|
||||
jobs:
|
||||
CodeQL-Build:
|
||||
|
||||
# CodeQL runs on ubuntu-latest and windows-latest
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
|
@ -22,10 +22,10 @@ jobs:
|
|||
# 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
|
||||
|
|
1
.github/workflows/test.yml
vendored
1
.github/workflows/test.yml
vendored
|
@ -10,7 +10,6 @@ on:
|
|||
- '**.md'
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
name: Build
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
dist/
|
||||
lib/
|
||||
node_modules/
|
||||
.licenses/
|
||||
|
|
|
@ -6,6 +6,5 @@
|
|||
"singleQuote": true,
|
||||
"trailingComma": "none",
|
||||
"bracketSpacing": false,
|
||||
"arrowParens": "avoid",
|
||||
"parser": "typescript"
|
||||
}
|
||||
"arrowParens": "avoid"
|
||||
}
|
||||
|
|
|
@ -14,21 +14,21 @@ appearance, race, religion, or sexual identity and orientation.
|
|||
Examples of behavior that contributes to creating a positive environment
|
||||
include:
|
||||
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
- Using welcoming and inclusive language
|
||||
- Being respectful of differing viewpoints and experiences
|
||||
- Gracefully accepting constructive criticism
|
||||
- Focusing on what is best for the community
|
||||
- Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or
|
||||
- The use of sexualized language or imagery and unwelcome sexual attention or
|
||||
advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic
|
||||
- Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
- Public or private harassment
|
||||
- Publishing others' private information, such as a physical or electronic
|
||||
address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
- Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
|
|
@ -32,8 +32,8 @@ Artifact related issues will be tracked in this repository so please do not open
|
|||
6. Make sure your code is correctly formatted: `npm run format`
|
||||
7. Make sure your code passes linting: `npm run lint`
|
||||
8. Update `dist/index.js` using `npm run release`. This creates a single javascript file that is used as an entry-point for the action
|
||||
7. Push to your fork and [submit a pull request][pr]
|
||||
8. Pat your self on the back and wait for your pull request to be reviewed and merged.
|
||||
9. Push to your fork and [submit a pull request][pr]
|
||||
10. Pat your self on the back and wait for your pull request to be reviewed and merged.
|
||||
|
||||
Here are a few things you can do that will increase the likelihood of your pull request being accepted:
|
||||
|
||||
|
|
34
README.md
34
README.md
|
@ -28,13 +28,13 @@ See [action.yml](action.yml)
|
|||
|
||||
```yaml
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- run: mkdir -p path/to/artifact
|
||||
- run: mkdir -p path/to/artifact
|
||||
|
||||
- run: echo hello > path/to/artifact/world.txt
|
||||
- run: echo hello > path/to/artifact/world.txt
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: my-artifact
|
||||
path: path/to/artifact/world.txt
|
||||
|
@ -152,10 +152,10 @@ With the following example, the available artifact (named `artifact` by default
|
|||
Each artifact behaves as a file share. Uploading to the same artifact multiple times in the same workflow can overwrite and append already uploaded files:
|
||||
|
||||
```yaml
|
||||
strategy:
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [8.x, 10.x, 12.x, 13.x]
|
||||
steps:
|
||||
steps:
|
||||
- name: Create a file
|
||||
run: echo ${{ matrix.node-version }} > my_file.txt
|
||||
- name: Accidentally upload to the same artifact via multiple jobs
|
||||
|
@ -170,8 +170,8 @@ Each artifact behaves as a file share. Uploading to the same artifact multiple t
|
|||
In the above example, four jobs will upload four different files to the same artifact but there will only be one file available when `my-artifact` is downloaded. Each job overwrites what was previously uploaded. To ensure that jobs don't overwrite existing artifacts, use a different name per job:
|
||||
|
||||
```yaml
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: my-artifact ${{ matrix.node-version }}
|
||||
path: ${{ github.workspace }}
|
||||
```
|
||||
|
@ -181,10 +181,10 @@ In the above example, four jobs will upload four different files to the same art
|
|||
You can use `~` in the path input as a substitute for `$HOME`. Basic tilde expansion is supported:
|
||||
|
||||
```yaml
|
||||
- run: |
|
||||
- run: |
|
||||
mkdir -p ~/new/artifact
|
||||
echo hello > ~/new/artifact/world.txt
|
||||
- uses: actions/upload-artifact@v3
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Artifacts-V3
|
||||
path: ~/new/**/*
|
||||
|
@ -193,9 +193,9 @@ You can use `~` in the path input as a substitute for `$HOME`. Basic tilde expan
|
|||
Environment variables along with context expressions can also be used for input. For documentation see [context and expression syntax](https://help.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions):
|
||||
|
||||
```yaml
|
||||
env:
|
||||
env:
|
||||
name: my-artifact
|
||||
steps:
|
||||
steps:
|
||||
- run: |
|
||||
mkdir -p ${{ github.workspace }}/artifact
|
||||
echo hello > ${{ github.workspace }}/artifact/world.txt
|
||||
|
@ -208,7 +208,7 @@ Environment variables along with context expressions can also be used for input.
|
|||
For environment variables created in other steps, make sure to use the `env` expression syntax
|
||||
|
||||
```yaml
|
||||
steps:
|
||||
steps:
|
||||
- run: |
|
||||
mkdir testing
|
||||
echo "This is a file to upload" > testing/file.txt
|
||||
|
@ -224,10 +224,10 @@ For environment variables created in other steps, make sure to use the `env` exp
|
|||
Artifacts are retained for 90 days by default. You can specify a shorter retention period using the `retention-days` input:
|
||||
|
||||
```yaml
|
||||
- name: Create a file
|
||||
- name: Create a file
|
||||
run: echo "I won't live long" > my_file.txt
|
||||
|
||||
- name: Upload Artifact
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: my-artifact
|
||||
|
@ -266,10 +266,10 @@ During a workflow run, files are uploaded and downloaded individually using the
|
|||
If file permissions and case sensitivity are required, you can `tar` all of your files together before artifact upload. Post download, the `tar` file will maintain file permissions and case sensitivity:
|
||||
|
||||
```yaml
|
||||
- name: Tar files
|
||||
- name: Tar files
|
||||
run: tar -cvf my_files.tar /path/to/my/directory
|
||||
|
||||
- name: Upload Artifact
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: my-artifact
|
||||
|
|
|
@ -9,4 +9,4 @@ module.exports = {
|
|||
'^.+\\.ts$': 'ts-jest'
|
||||
},
|
||||
verbose: true
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,9 +7,9 @@
|
|||
"build": "tsc",
|
||||
"release": "ncc build src/upload-artifact.ts && git add -f dist/",
|
||||
"check-all": "concurrently \"npm:format-check\" \"npm:lint\" \"npm:test\" \"npm:build\"",
|
||||
"format": "prettier --write **/*.ts",
|
||||
"format-check": "prettier --check **/*.ts",
|
||||
"lint": "eslint **/*.ts",
|
||||
"format": "prettier --write .",
|
||||
"format-check": "prettier --check .",
|
||||
"lint": "eslint .",
|
||||
"test": "jest --testTimeout 10000"
|
||||
},
|
||||
"repository": {
|
||||
|
|
|
@ -14,4 +14,4 @@
|
|||
"lib": ["es6"]
|
||||
},
|
||||
"exclude": ["node_modules", "**/*.test.ts"]
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue