Add meta files

This commit is contained in:
Webber
2020-01-29 20:43:11 +01:00
committed by Webber Takken
parent 6854c930fe
commit 29197ce88c
14 changed files with 6039 additions and 13 deletions

View File

@@ -11,11 +11,11 @@ tab_width = 2
trim_trailing_whitespace = true
[*.md]
max_line_length = 0
max_line_length = off
trim_trailing_whitespace = false
[*.yml]
max_line_length = 0
[*.{yml,yaml}]
max_line_length = off
[COMMIT_EDITMSG]
max_line_length = 0
max_line_length = off

2
.eslintignore Normal file
View File

@@ -0,0 +1,2 @@
**/node_modules/**
**/action/**

21
.eslintrc.json Normal file
View File

@@ -0,0 +1,21 @@
{
"parser": "babel-eslint",
"env": {
"node": true,
"es6": true,
"jest": true
},
"parserOptions": {
"ecmaVersion": 2020,
"ecmaFeatures": {
"impliedStrict": true
}
},
"extends": ["airbnb", "plugin:unicorn/recommended", "prettier"],
"plugins": ["react", "jsx-a11y", "import", "prettier", "flowtype", "unicorn"],
"settings": { "react": { "version": "latest" } },
"rules": {
"prettier/prettier": "error",
"import/no-extraneous-dependencies": 0
}
}

1
.gitignore vendored
View File

@@ -1 +1,2 @@
.idea
node_modules

2
.prettierignore Normal file
View File

@@ -0,0 +1,2 @@
**/node_modules/**
**/action/**

6
.prettierrc.json Normal file
View File

@@ -0,0 +1,6 @@
{
"semi": true,
"singleQuote": true,
"trailingComma": "all",
"printWidth": 100
}

3
.yarnrc Normal file
View File

@@ -0,0 +1,3 @@
save-prefix ""
--install.audit true
--add.audit true

View File

@@ -19,8 +19,20 @@ When fixing a bug it is fine to submit a pull request right away.
Steps to be performed to submit a pull request:
1. Fork the repository and create your branch from `master`
2. Fill out the description, link any related issues and submit your pull request.
1. Fork the repository and create your branch from `master`.
2. Run `yarn` in the repository root.
3. If you've fixed a bug or added code that should be tested, add tests!
4. Fill out the description, link any related issues and submit your pull request.
#### Pull Request Prerequisites
You have [Node](https://nodejs.org/) installed at v12.2.0+ and [Yarn](https://yarnpkg.com/) at v1.18.0+.
Please note that commit hooks will run automatically to perform some tasks;
- format your code
- run tests
- build distributable files
#### License

View File

@@ -12,10 +12,10 @@ Part of the [Unity Actions](https://github.com/webbertakken/unity-actions) colle
Use this action to activate Unity using credentials or a license file. Both
**personal** and **professional** licenses are supported.
When successfully activated, you will be able to run the
Note that the latest versions of
[Test](https://github.com/webbertakken/unity-actions#test) and
[Build](https://github.com/webbertakken/unity-actions#build)
actions.
contain standalone activation and no longer require this action.
### Documentation
@@ -25,7 +25,7 @@ collection repository for workflow documentation and reference implementation.
## Usage
Create or edit the file called `.github/workflows/activation.yml` and add a job to it.
Create or edit the file called `.github/workflows/main.yml` and add a job to it.
```yaml
name: Activate Unity
@@ -69,6 +69,8 @@ Continue to either the personal license or professional license section below.
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
```
Commit and push your workflow definition.
## More actions
Visit

View File

@@ -1,11 +1,15 @@
name: 'Unity - Activate'
author: Webber Takken <webber@takken.io>
description: 'Activate Unity using credentials or a license file. Both personal and professional licenses are supported.'
inputs: {}
inputs:
unityVersion:
required: false
default: '2019.2.11f1'
description: 'Version of unity to use for building the project.'
outputs: {}
runs:
using: 'docker'
image: 'Dockerfile'
branding:
icon: 'box'
color: 'gray-dark'
runs:
using: 'node12'
main: 'action/index.js'

15
babel.config.js Normal file
View File

@@ -0,0 +1,15 @@
const esModules = ['lodash-es'].join('|');
module.exports = {
ignore: [`/node_modules/(?!${esModules})`],
presets: [
[
'@babel/preset-env',
{
targets: {
node: true,
},
},
],
],
};

8
jest.config.js Normal file
View File

@@ -0,0 +1,8 @@
const esModules = ['lodash-es'].join('|');
module.exports = {
testEnvironment: 'node',
moduleFileExtensions: ['js', 'jsx', 'json', 'vue'],
transform: { '^.+\\.(js|jsx)?$': 'babel-jest' },
transformIgnorePatterns: [`/node_modules/(?!${esModules})`],
};

57
package.json Normal file
View File

@@ -0,0 +1,57 @@
{
"name": "unity-activate",
"version": "0.0.0",
"description": "Activate Unity using credentials or a license file. Both personal and professional licenses are supported.",
"main": "action/index.js",
"repository": "git@github.com:webbertakken/unity-activate.git",
"author": "Webber <webber@takken.io>",
"license": "MIT",
"scripts": {
"build": "ncc build src --out action --minify",
"lint": "prettier --check \"src/**/*.js\" && eslint src",
"test": "jest"
},
"dependencies": {
"@actions/core": "^1.2.0",
"@actions/exec": "1.0.2",
"@actions/github": "^2.0.0"
},
"devDependencies": {
"@babel/cli": "7.7.5",
"@babel/core": "7.7.5",
"@babel/preset-env": "7.7.7",
"@zeit/ncc": "0.20.5",
"babel-eslint": "10.0.3",
"eslint": "6.7.2",
"eslint-config-airbnb": "18.0.1",
"eslint-config-prettier": "6.7.0",
"eslint-plugin-flowtype": "4.5.2",
"eslint-plugin-import": "2.19.1",
"eslint-plugin-jsx-a11y": "6.2.3",
"eslint-plugin-prettier": "3.1.2",
"eslint-plugin-react": "7.17.0",
"eslint-plugin-unicorn": "14.0.1",
"husky": "4.0.0-beta.5",
"jest": "24.9.0",
"lint-staged": "9.5.0",
"lodash-es": "4.17.15",
"prettier": "1.19.1"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged && yarn build && git add action/index.js"
}
},
"lint-staged": {
"*.{js,jsx}": [
"prettier --write",
"eslint",
"git add",
"jest --findRelatedTests"
],
"*.{json,md,yaml,yml}": [
"prettier --write",
"git add"
]
}
}

5893
yarn.lock Normal file

File diff suppressed because it is too large Load Diff