-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: #116 #117 update ts-definition pipeline, scripts #226
Merged
willmcvay
merged 5 commits into
master
from
chore/116-117-update-ts-definition-pipeline-scripts
Feb 13, 2020
Merged
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
416ce77
chore: #116 #117 update ts-definition pipeline, scripts
phmngocnghia 04cacf8
chore: lock version of package "foundation-ts-definition" for all app…
phmngocnghia da6d135
fix
phmngocnghia fd25b17
update elements package to include foundation definition
phmngocnghia 43b9f0e
remove password param from test
phmngocnghia File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,45 @@ | ||
name: Check for Typescript definition update | ||
|
||
on: | ||
schedule: | ||
# * is a special character in YAML so you have to quote this string | ||
- cron: '0 0 1-31 * *' | ||
|
||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checks out repository to $GITHUB_WORKSPACE | ||
uses: actions/checkout@v1 | ||
|
||
- name: Setup Node Environement | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
|
||
- name: Cache node modules | ||
id: cache | ||
uses: actions/cache@v1 | ||
with: | ||
path: node_modules | ||
key: build-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
build-${{ hashFiles('**/yarn.lock') }} | ||
|
||
- name: Integrate Git credential | ||
uses: webfactory/ssh-agent@v0.1.1 | ||
with: | ||
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | ||
|
||
- name: Install dependencies | ||
run: yarn install | ||
|
||
- name: Fetch latest definition | ||
run: yarn workspace @reapit/foundations-ts-definitions fetch-definition | ||
|
||
- name: If definition is changed then bump minor npm package, publish and push commit to master | ||
run: yarn workspace @reapit/foundations-ts-definitions handle-cron-job | ||
|
||
env: | ||
NPM_TOKEN: ${{secrets.NPM_TOKEN}} | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |
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 |
---|---|---|
|
@@ -3,7 +3,7 @@ name: Release production | |
on: | ||
push: | ||
tags: | ||
- '*' | ||
- '*' | ||
|
||
env: | ||
NPM_TOKEN: ${{secrets.NPM_TOKEN}} | ||
|
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 |
---|---|---|
|
@@ -56,4 +56,4 @@ elements/public | |
out* | ||
package-lock.json | ||
.env | ||
invite-developers.js | ||
invite-developers.js |
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 @@ | ||
//registry.npmjs.org/:_authToken=${NPM_TOKEN} | ||
//registry.npmjs.org/:_authToken=${NPM_TOKEN} |
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 @@ | ||
//registry.npmjs.org/:_authToken=${NPM_TOKEN} |
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
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 @@ | ||
//registry.npmjs.org/:_authToken=${NPM_TOKEN} | ||
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,26 +1,23 @@ | ||
{ | ||
"name": "@reapit/foundations-ts-definitions", | ||
"version": "0.0.18", | ||
"version": "0.0.38", | ||
"license": "MIT", | ||
"files": [ | ||
"types/*" | ||
], | ||
"main": "./types/index.ts", | ||
"peerDependencies": { | ||
}, | ||
"license": "MIT", | ||
"scripts": { | ||
"fetch:platform": "node './scripts/fetch-platform-definition.js'", | ||
"fetch:marketPlace": "node './scripts/fetch-marketplace-definition.js'", | ||
"fetch:definition": "rimraf types && mkdir types && yarn fetch:platform && yarn fetch:marketPlace && yarn create-index-file", | ||
"create-index-file": "node './scripts/create-index-file.js'", | ||
"handle-cronjob": "node ./scripts/handle-cronjob.js" | ||
}, | ||
"dependencies": { | ||
"release:prod": "node ../../scripts/foundations-ts-definitions/release-npm.js foundations-ts-definitions", | ||
"fetch-definition": "node '../../scripts/foundations-ts-definitions/fetch-definition.js'", | ||
"handle-cron-job": "node '../../scripts/foundations-ts-definitions/handle-cronjob.js'", | ||
"test:update-badges": "echo 'not implmented'" | ||
}, | ||
"lint-staged": { | ||
"src/**/*.{js,jsx,ts,tsx,json,css,scss,md}": [ | ||
"prettier --write", | ||
"git add" | ||
] | ||
} | ||
}, | ||
"dependencies": {}, | ||
"peerDependencies": {} | ||
} |
15 changes: 0 additions & 15 deletions
15
packages/foundations-ts-definitions/scripts/check-version.js
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
packages/foundations-ts-definitions/scripts/create-index-file.js
This file was deleted.
Oops, something went wrong.
40 changes: 0 additions & 40 deletions
40
packages/foundations-ts-definitions/scripts/release-master.js
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't think this is necessary as the npmrc is at the package root
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
npmrc is required because even using yarn workspace command to execute the release script, the cwd still resides in the packages/foundation. Yarn/NPM only read npmrc to its closest workspace directory (the nearest folder containing package.json). Having tested this against release:npm script, this could lead to possible bugs of other NPM packages release production flow (elements, cognito... etc)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have also informed our team about this. Testing release production flow of NPM package is currently being conducted.