-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
10 changed files
with
2,457 additions
and
96 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 |
---|---|---|
@@ -0,0 +1,65 @@ | ||
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: main | ||
- uses: actions/setup-node@v2 | ||
with: | ||
always-auth: true | ||
node-version: 12.x | ||
- 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-script@v4 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
script: | | ||
github.issues.createComment({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
body: "@${{github.actor}} `shipjs prepare` done" | ||
}) | ||
create_fail_comment: | ||
if: cancelled() || failure() | ||
needs: manual_prepare | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/github-script@v4 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
script: | | ||
github.issues.createComment({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
body: "@${{github.actor}} `shipjs prepare` fail" | ||
}) |
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,32 @@ | ||
name: Ship js trigger | ||
on: | ||
pull_request: | ||
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: main | ||
- uses: actions/setup-node@v2 | ||
with: | ||
always-auth: true | ||
node-version: 14.x | ||
registry-url: 'https://npm.pkg.github.com' | ||
- run: | | ||
if [ -f "yarn.lock" ]; then | ||
yarn install | ||
else | ||
npm install | ||
fi | ||
- run: npx shipjs trigger | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_AUTH_TOKEN: ${{ secrets.GITHUB_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 |
---|---|---|
@@ -1 +1,61 @@ | ||
lib | ||
|
||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# next.js | ||
.next/ | ||
/out/ | ||
|
||
# storybook | ||
storybook-static | ||
|
||
# production | ||
/src/build | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
*.tmp | ||
*.log* | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# local env files | ||
*.env | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
# vercel | ||
.vercel | ||
|
||
*-debug.log | ||
*/*-debug.log | ||
|
||
package-lock.json | ||
|
||
.yalc | ||
.env | ||
|
||
## firebase | ||
.firebase/ | ||
.runtimeconfig.json | ||
firebase-adminsdk.json | ||
|
||
## rollup | ||
.size-snapshot.json | ||
|
||
.env |
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,5 @@ | ||
{ | ||
"trailingComma": "es5", | ||
"singleQuote": true, | ||
"semi": false | ||
} |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "twitter-api", | ||
"author": "", | ||
"author": "locona([email protected])", | ||
"version": "0.0.1", | ||
"description": "", | ||
"main": "./lib/index.js", | ||
|
@@ -10,7 +10,8 @@ | |
"build:js": "NODE_ENV=production node ./esbuild/build.js", | ||
"build:js:watch": "NODE_ENV=production node ./esbuild/watch.js", | ||
"build": "yarn build:types && yarn build:js", | ||
"dev": "ts-node ./lib/index.js" | ||
"dev": "ts-node ./lib/index.js", | ||
"release": "shipjs prepare" | ||
}, | ||
"license": "ISC", | ||
"files": [ | ||
|
@@ -22,12 +23,17 @@ | |
"@types/request": "2.48.5", | ||
"dotenv": "8.6.0", | ||
"esbuild": "0.11.20", | ||
"prettier": "2.3.1", | ||
"shipjs": "0.23.3", | ||
"ts-node": "9.1.1", | ||
"typescript": "4.2.4" | ||
}, | ||
"dependencies": { | ||
"node-fetch": "^2.6.1", | ||
"oauth-1.0a": "^2.2.6", | ||
"querystring": "^0.2.1" | ||
}, | ||
"volta": { | ||
"node": "14.17.1" | ||
} | ||
} |
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,3 @@ | ||
module.exports = { | ||
publishCommand: ({ tag }) => `yarn publish --tag ${tag}`, | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,38 @@ | ||
{ | ||
"compilerOptions": { | ||
"module": "esnext", | ||
"target": "esnext", | ||
"moduleResolution": "node", | ||
"lib": [ | ||
"ESNext", | ||
"dom" | ||
], | ||
|
||
"rootDir": "src", | ||
"outDir": "lib", | ||
|
||
"strict": true, | ||
"alwaysStrict": true, | ||
"strictFunctionTypes": true, | ||
"strictNullChecks": true, | ||
"strictPropertyInitialization": true, | ||
|
||
"forceConsistentCasingInFileNames": true, | ||
"noImplicitAny": true, | ||
"noImplicitReturns": true, | ||
"noImplicitThis": true, | ||
"noFallthroughCasesInSwitch": true, | ||
"noUnusedLocals": true, | ||
"noUnusedParameters": true, | ||
|
||
"emitDecoratorMetadata": true, | ||
"experimentalDecorators": true, | ||
"downlevelIteration": true, | ||
"declaration": true, | ||
"esModuleInterop": true, | ||
|
||
"pretty": true | ||
}, | ||
"include": [ | ||
"typings/**/*", | ||
"src/**/*" | ||
] | ||
} | ||
"compilerOptions": { | ||
"module": "esnext", | ||
"target": "esnext", | ||
"moduleResolution": "node", | ||
"lib": [ | ||
"ESNext", | ||
"dom" | ||
], | ||
"rootDir": "src", | ||
"outDir": "lib", | ||
"strict": true, | ||
"alwaysStrict": true, | ||
"strictFunctionTypes": true, | ||
"strictNullChecks": true, | ||
"strictPropertyInitialization": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"noImplicitAny": true, | ||
"noImplicitReturns": true, | ||
"noImplicitThis": true, | ||
"noFallthroughCasesInSwitch": true, | ||
"noUnusedLocals": true, | ||
"noUnusedParameters": true, | ||
"emitDecoratorMetadata": true, | ||
"experimentalDecorators": true, | ||
"downlevelIteration": true, | ||
"declaration": true, | ||
"esModuleInterop": true, | ||
"pretty": true | ||
}, | ||
"include": [ | ||
"typings/**/*", | ||
"src/**/*" | ||
], | ||
"exclude": [ | ||
"example" | ||
] | ||
} |
Oops, something went wrong.