Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
xrkffgg committed Feb 20, 2021
0 parents commit 7476a74
Show file tree
Hide file tree
Showing 11 changed files with 719 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: CI

on: [push, pull_request]

jobs:
setup:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@main

- name: install
run: yarn install

- name: format-check
run: yarn format-check

- name: package
run: yarn package
54 changes: 54 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# @source: https://github.com/xrkffgg/gitignore/blob/master/.gitignore

# production
# /dist
/docs-dist
/lib

# Log file
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Private

# misc
.DS_Store

# dependencies
node_modules
yarn.lock
package-lock.json

# local env files
.env.local
.env.*.local

# Compiled file
*.class
*.css.map
*.sass.map
*.scss.map

# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
~$*.*

# umi
.umi
.umi-production
.umi-test
.env.local

# cache
.sass-cache/

# test
coverage
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dist/
lib/
docs-dist/
node_modules/
6 changes: 6 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const fabric = require('@umijs/fabric');

module.exports = {
...fabric.prettier,
arrowParens: 'avoid',
};
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Changelog

## v1.0.0

`2021.xx.xx`

- 🎉 Init.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021-present xrkffgg

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
46 changes: 46 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<p align="center">
<a href="">
<img width="140" src="https://avatars.githubusercontent.com/u/73879334?s=200&v=4" />
</a>
</p>

<h1 align="center">Action JavaScript Template</h1>
<div align="center">
A simple javascript template for rapid development of GitHub actions.
</div>

![](https://img.shields.io/github/workflow/status/actions-cool/action-js-template/CI?style=flat-square)
[![](https://img.shields.io/badge/marketplace-action--js--template-blueviolet?style=flat-square)](https://github.com/marketplace/actions/action-js-template)
[![](https://img.shields.io/github/v/release/actions-cool/action-js-template?style=flat-square&color=orange)](https://github.com/actions-cool/action-js-template/releases)

## 🚀 How to use?

![](https://github.com/actions-cool/resources/blob/main/image/template-js.png?raw=true)

## 📒 Catalog Introduction

```
├── .github/workflows/ The CI for make sure it is packaged correctly
├── dist Package the generated Aciton execution code
├── src Component home directory
│ └── main.js Your code
└── action.yml Action config
```

The rest of the documents can be consulted by yourself.

## 🤖 Command introduction

| Name | Desc |
| -- | -- |
| package | action build for release |
| format | prettier write |
| format-check | prettier check |

## Changelog

[CHANGELOG](./CHANGELOG.md)

## LICENSE

[MIT](./LICENSE)
24 changes: 24 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions
name: 'Action JS Template'
description: 'A simple javascript template for rapid development of GitHub actions.'
author: 'xrkffgg'

branding:
# https://feathericons.com/
# e.g. https://haya14busa.github.io/github-action-brandings/
icon: 'file'
color: 'blue'

inputs:
GITHUB_TOKEN:
description: Secret GitHub API token to use for making API requests.
default: ${{ github.token }}
required: true

#outputs:
# result:
# description: action result

runs:
using: 'node12'
main: 'dist/index.js'
Loading

0 comments on commit 7476a74

Please sign in to comment.