-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e11b8f9
commit 16b0393
Showing
7 changed files
with
107 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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", | ||
|
52 changes: 52 additions & 0 deletions
52
packages/build-static/template/.github/workflows/shipjs-manual-prepare.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
25 changes: 25 additions & 0 deletions
25
packages/build-static/template/.github/workflows/shipjs-trigger.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"extends": [ | ||
"config:base", | ||
":preserveSemverRanges" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters