Skip to content

Commit

Permalink
feat(static): add file
Browse files Browse the repository at this point in the history
  • Loading branch information
marsprince committed Aug 21, 2020
1 parent e11b8f9 commit 16b0393
Show file tree
Hide file tree
Showing 7 changed files with 107 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"author": "liujia02 <[email protected]>",
"license": "MIT",
"devDependencies": {
"@razors/build-commit": "^0.0.16",
"@razors/build-commit": "*",
"@razors/build-jest": "*",
"lerna": "^3.22.1",
"shipjs": "0.20.1",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Ship js Manual Prepare
on:
issue_comment:
types: [created]
jobs:
manual_prepare:
if: |
github.event_name == 'issue_comment' &&
(github.event.comment.author_association == 'member' || github.event.comment.author_association == 'owner') &&
startsWith(github.event.comment.body, '@shipjs prepare')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
ref: master
- uses: actions/setup-node@v1
- run: |
if [ -f "yarn.lock" ]; then
yarn install
else
npm install
fi
- run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
- run: npm run release -- --yes --no-browse
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_INCOMING_HOOK: ${{ secrets.SLACK_INCOMING_HOOK }}

create_done_comment:
if: success()
needs: manual_prepare
runs-on: ubuntu-latest
steps:
- uses: actions/github@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: comment "@${{ github.actor }} `shipjs prepare` done"

create_fail_comment:
if: cancelled() || failure()
needs: manual_prepare
runs-on: ubuntu-latest
steps:
- uses: actions/github@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: comment "@${{ github.actor }} `shipjs prepare` fail"
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Ship js trigger
on:
pull_request:
branches: [ master ]
types:
- closed
jobs:
build:
name: Release
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'releases/v')
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
ref: master
- uses: actions/setup-node@v1
with:
registry-url: "https://registry.npmjs.org"
- run: yarn install
- run: npx shipjs trigger
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
SLACK_INCOMING_HOOK: ${{ secrets.SLACK_INCOMING_HOOK }}
23 changes: 23 additions & 0 deletions packages/build-static/template/.github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Test
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-node@v1
with:
registry-url: "https://registry.npmjs.org"
- run: yarn install
- run: yarn test
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
SLACK_INCOMING_HOOK: ${{ secrets.SLACK_INCOMING_HOOK }}
6 changes: 6 additions & 0 deletions packages/build-static/template/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": [
"config:base",
":preserveSemverRanges"
]
}
1 change: 0 additions & 1 deletion packages/build-static/template/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"module": "esnext",
"strict": false,
"jsx": "preserve",
"jsxFactory": "VueTsxSupport",
"importHelpers": true,
"moduleResolution": "node",
"esModuleInterop": true,
Expand Down
7 changes: 0 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1887,10 +1887,6 @@
dependencies:
"@types/node" ">= 8"

"@razors/build-commit@^0.0.16":
version "0.0.16"
resolved "https://registry.yarnpkg.com/@razors/build-commit/-/build-commit-0.0.16.tgz#c241d42bb5a1eb13bba0e5e17af9b7455c4f80ba"

"@rollup/plugin-babel@^5.0.4":
version "5.2.0"
resolved "https://registry.yarnpkg.com/@rollup/plugin-babel/-/plugin-babel-5.2.0.tgz#b87556d61ed108b4eaf9d18b5323965adf8d9bee"
Expand All @@ -1901,7 +1897,6 @@
"@rollup/plugin-commonjs@^15.0.0":
version "15.0.0"
resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-15.0.0.tgz#690d15a9d54ba829db93555bff9b98ff34e08574"
integrity sha512-8uAdikHqVyrT32w1zB9VhW6uGwGjhKgnDNP4pQJsjdnyF4FgCj6/bmv24c7v2CuKhq32CcyCwRzMPEElaKkn0w==
dependencies:
"@rollup/pluginutils" "^3.1.0"
commondir "^1.0.1"
Expand Down Expand Up @@ -3884,7 +3879,6 @@ estree-walker@^1.0.1:
estree-walker@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-2.0.1.tgz#f8e030fb21cefa183b44b7ad516b747434e7a3e0"
integrity sha512-tF0hv+Yi2Ot1cwj9eYHtxC0jB9bmjacjQs6ZBTj82H8JwUywFuc+7E83NWfNMwHXZc11mjfFcVXPe9gEP4B8dg==

esutils@^2.0.2:
version "2.0.3"
Expand Down Expand Up @@ -5011,7 +5005,6 @@ is-promise@^2.0.0:
is-reference@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/is-reference/-/is-reference-1.2.1.tgz#8b2dac0b371f4bc994fdeaba9eb542d03002d0b7"
integrity sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==
dependencies:
"@types/estree" "*"

Expand Down

0 comments on commit 16b0393

Please sign in to comment.