Skip to content
This repository has been archived by the owner on Nov 24, 2023. It is now read-only.

Commit

Permalink
feat: Build for release
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Mar 5, 2020
1 parent 8c06f15 commit ec9d35e
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 60 deletions.
54 changes: 25 additions & 29 deletions README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@
- [使用方法](#%E4%BD%BF%E7%94%A8%E6%96%B9%E6%B3%95)
- [動作](#%E5%8B%95%E4%BD%9C)
- [出力](#%E5%87%BA%E5%8A%9B)
- [diff](#diff)
- [count](#count)
- [insertions](#insertions)
- [deletions](#deletions)
- [lines](#lines)
- [Action イベント詳細](#action-%E3%82%A4%E3%83%99%E3%83%B3%E3%83%88%E8%A9%B3%E7%B4%B0)
- [対象イベント](#%E5%AF%BE%E8%B1%A1%E3%82%A4%E3%83%99%E3%83%B3%E3%83%88)
- [補足](#%E8%A3%9C%E8%B6%B3)
Expand All @@ -51,22 +46,36 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: technote-space/get-diff-action@v1
# id: git-diff
with:
PREFIX_FILTER: |
src
__tests__
SUFFIX_FILTER: .ts
- name: Install Package dependencies
run: yarn install
# if: steps.git-diff.outputs.diff
if: env.GIT_DIFF
- name: Check code style
# 差分があるソースコードだけチェック
# run: yarn eslint ${{ steps.git-diff.outputs.diff }}
run: yarn eslint ${{ env.GIT_DIFF }}
# if: steps.git-diff.outputs.diff
if: env.GIT_DIFF

phpmd:
name: PHPMD
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: technote-space/get-diff-action@v1
id: git_diff
with:
SUFFIX_FILTER: .php
SEPARATOR: ','
- name: Install composer
run: composer install
if: steps.git_diff.outputs.diff
- name: Check code style
# 差分があるソースコードだけチェック
run: vendor/bin/phpmd ${{ steps.git_diff.outputs.diff }} ansi phpmd.xml
if: steps.git_diff.outputs.diff
```
以下のソースコードに差分がない場合、この Workflow はコードのスタイルチェックをスキップします。
Expand Down Expand Up @@ -134,26 +143,13 @@ jobs:
```

## 出力
### diff
差分のあるファイルの結果
もし `SET_ENV_NAME` が設定されている場合、その名前で環境変数が設定されます。
default: `SET_ENV_NAME=GIT_DIFF`
### count
差分のあるファイル数
もし `SET_ENV_NAME_COUNT` が設定されている場合、その名前で環境変数が設定されます。
default: `SET_ENV_NAME_COUNT=`
### insertions
追加された行数
もし `SET_ENV_NAME_INSERTIONS` が設定されている場合、その名前で環境変数が設定されます。
default: `SET_ENV_NAME_INSERTIONS=`
### deletions
削除された行数
もし `SET_ENV_NAME_DELETIONS` が設定されている場合、その名前で環境変数が設定されます。
default: `SET_ENV_NAME_DELETIONS=`
### lines
追加された行数と削除された行数の和
もし `SET_ENV_NAME_LINES` が設定されている場合、その名前で環境変数が設定されます。
default: `SET_ENV_NAME_LINES=`
| name | description | e.g. |
|:---:|:---|:---:|
|diff|差分のあるファイルの結果<br>`SET_ENV_NAME`(default: `GIT_DIFF`) が設定されている場合、その名前で環境変数が設定されます|`src/main.ts src/utils/command.ts`|
|count|差分のあるファイル数<br>`SET_ENV_NAME_COUNT`(default: `''`) が設定されている場合、その名前で環境変数が設定されます|`100`|
|insertions|追加された行数<br>`SET_ENV_NAME_INSERTIONS`(default: `''`) が設定されている場合、その名前で環境変数が設定されます|`100`|
|deletions|削除された行数<br>`SET_ENV_NAME_DELETIONS`(default: `''`) が設定されている場合、その名前で環境変数が設定されます|`100`|
|lines|追加された行数と削除された行数の和<br>`SET_ENV_NAME_LINES`(default: `''`) が設定されている場合、その名前で環境変数が設定されます|`200`|

## Action イベント詳細
### 対象イベント
Expand Down
54 changes: 25 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ GitHub actions to get git diff.
- [Usage](#usage)
- [Behavior](#behavior)
- [Outputs](#outputs)
- [diff](#diff)
- [count](#count)
- [insertions](#insertions)
- [deletions](#deletions)
- [lines](#lines)
- [Action event details](#action-event-details)
- [Target events](#target-events)
- [Addition](#addition)
Expand All @@ -51,22 +46,36 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: technote-space/get-diff-action@v1
# id: git-diff
with:
PREFIX_FILTER: |
src
__tests__
SUFFIX_FILTER: .ts
- name: Install Package dependencies
run: yarn install
# if: steps.git-diff.outputs.diff
if: env.GIT_DIFF
- name: Check code style
# Check only the source codes that have differences
# run: yarn eslint ${{ steps.git-diff.outputs.diff }}
run: yarn eslint ${{ env.GIT_DIFF }}
# if: steps.git-diff.outputs.diff
if: env.GIT_DIFF

phpmd:
name: PHPMD
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: technote-space/get-diff-action@v1
id: git_diff
with:
SUFFIX_FILTER: .php
SEPARATOR: ','
- name: Install composer
run: composer install
if: steps.git_diff.outputs.diff
- name: Check code style
# Check only the source codes that have differences
run: vendor/bin/phpmd ${{ steps.git_diff.outputs.diff }} ansi phpmd.xml
if: steps.git_diff.outputs.diff
```
If there is no difference in the source code below, this workflow will skip the code style check
Expand Down Expand Up @@ -134,26 +143,13 @@ If there is no difference in the source code below, this workflow will skip the
```

## Outputs
### diff
The results of diff file names.
if inputs `SET_ENV_NAME` is set, an environment variable is set with that name.
default: `SET_ENV_NAME=GIT_DIFF`
### count
The number of diff files.
if inputs `SET_ENV_NAME_COUNT` is set, an environment variable is set with that name.
default: `SET_ENV_NAME_COUNT=`
### insertions
The number of insertions lines.
if inputs `SET_ENV_NAME_INSERTIONS` is set, an environment variable is set with that name.
default: `SET_ENV_NAME_INSERTIONS=`
### deletions
The number of deletions lines.
if inputs `SET_ENV_NAME_DELETIONS` is set, an environment variable is set with that name.
default: `SET_ENV_NAME_DELETIONS=`
### lines
The number of diff lines.
if inputs `SET_ENV_NAME_LINES` is set, an environment variable is set with that name.
default: `SET_ENV_NAME_LINES=`
| name | description | e.g. |
|:---:|:---|:---:|
|diff|The results of diff file names.<br>If inputs `SET_ENV_NAME`(default: `GIT_DIFF`) is set, an environment variable is set with that name.|`src/main.ts src/utils/command.ts`|
|count|The number of diff files.<br>If inputs `SET_ENV_NAME_COUNT`(default: `''`) is set, an environment variable is set with that name.|`100`|
|insertions|The number of insertions lines.<br>If inputs `SET_ENV_NAME_INSERTIONS`(default: `''`) is set, an environment variable is set with that name.|`100`|
|deletions|The number of deletions lines.<br>If inputs `SET_ENV_NAME_DELETIONS`(default: `''`) is set, an environment variable is set with that name.|`100`|
|lines|The number of diff lines.<br>If inputs `SET_ENV_NAME_LINES`(default: `''`) is set, an environment variable is set with that name.|`200`|

## Action event details
### Target events
Expand Down
2 changes: 1 addition & 1 deletion build.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"owner":"technote-space","repo":"get-diff-action","sha":"FETCH_HEAD","ref":"refs/heads/master","tagName":"test/v1.1.11","branch":"gh-actions","tags":["test/v1.1.11","test/v1.1","test/v1"],"updated_at":"2020-03-04T18:51:29.769Z"}
{"owner":"technote-space","repo":"get-diff-action","sha":"6e4a7afaf383eee2fb65ca799bc899994452a252","ref":"refs/tags/v1.2.0","tagName":"v1.2.0","branch":"gh-actions","tags":["v1.2.0","v1.2","v1"],"updated_at":"2020-03-05T05:00:18.766Z"}
2 changes: 1 addition & 1 deletion node_modules/.yarn-integrity

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ec9d35e

Please sign in to comment.