Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Fix #17 do not report secret on error, add github action
- Loading branch information
1 parent
7cb3e04
commit b4beb8e
Showing
8 changed files
with
173 additions
and
2 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,66 @@ | ||
| # node-etsy-client continuous integration | ||
|
|
||
| name: etsy_client_ci | ||
|
|
||
| # Controls when the action will run. | ||
| on: | ||
| # Triggers the workflow on pull request or push (only for the npmjs branch) | ||
| push: | ||
| branches: [ npmjs ] | ||
| pull_request: | ||
|
|
||
| # Allows you to run this workflow manually from the Actions tab | ||
| workflow_dispatch: | ||
|
|
||
| # A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
| jobs: | ||
| # This workflow contains a single job called "build" | ||
| build: | ||
| # The type of runner that the job will run on | ||
| runs-on: ubuntu-latest | ||
|
|
||
| env: | ||
| ETSY_SHOP: fakefakefakefake | ||
|
|
||
| strategy: | ||
| matrix: | ||
| # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | ||
| # node-version: [10.x, 12.x, 14.x, 15.x] | ||
| node-version: [12.x] | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v2 | ||
|
|
||
| - name: Use Node.js ${{ matrix.node-version }} | ||
| uses: actions/setup-node@v1 | ||
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
|
|
||
| - name: Cache dependencies | ||
| uses: actions/cache@v2 | ||
| with: | ||
| path: | | ||
| **/node_modules | ||
| key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }} | ||
|
|
||
| - name: Install dependencies | ||
| # - run: npm ci # need package.json.lock | ||
| run: npm install | ||
|
|
||
| - name: Run ci-tests with code coverage | ||
| run: npm run ci-test | ||
|
|
||
| - name: Report coverage to the PR | ||
| continue-on-error: true | ||
| uses: romeovs/lcov-reporter-action@v0.2.16 | ||
| with: | ||
| github-token: ${{ secrets.GITHUB_TOKEN }} | ||
| lcov-file: ./coverage/lcov.info | ||
|
|
||
| - name: Publish NpmJS package | ||
| if: github.ref == 'refs/heads/npmjs' | ||
| run: | | ||
| echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_DEPLOY_TOKEN }}" > .npmrc | ||
| npm whoami # rely on .npmrc | ||
| npm publish |
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,34 @@ | ||
| # WIP - node-etsy-client minor from 'main' branch to 'npmjs' branch | ||
| name: etsy_client_minor | ||
| on: | ||
| # Allows you to run this workflow manually from the Actions tab | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| node-version: [12.x] | ||
|
|
||
| steps: | ||
| - name: Git checkout | ||
| uses: actions/checkout@v2 | ||
| with: | ||
| ref: 'npmjs' | ||
| token: ${{ secrets.GH_ACTIONS_TOKEN }} | ||
|
|
||
| - name: Use Node.js ${{ matrix.node-version }} | ||
| uses: actions/setup-node@v1 | ||
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
|
|
||
| - name: Minor | ||
| run: | | ||
| git config --global user.email 'github-actions[bot]@users.noreply.github.com' | ||
| git config --global user.name 'github-actions[bot]' | ||
| git fetch --all | ||
| git checkout main | ||
| npm version minor | ||
| git branch -f npmjs | ||
| git push origin main npmjs --tags |
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,34 @@ | ||
| # WIP - node-etsy-client patch from 'main' branch to 'npmjs' branch | ||
| name: etsy_client_patch | ||
| on: | ||
| # Allows you to run this workflow manually from the Actions tab | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| node-version: [12.x] | ||
|
|
||
| steps: | ||
| - name: Git checkout | ||
| uses: actions/checkout@v2 | ||
| with: | ||
| ref: 'npmjs' | ||
| token: ${{ secrets.GH_ACTIONS_TOKEN }} | ||
|
|
||
| - name: Use Node.js ${{ matrix.node-version }} | ||
| uses: actions/setup-node@v1 | ||
| with: | ||
| node-version: ${{ matrix.node-version }} | ||
|
|
||
| - name: Patch | ||
| run: | | ||
| git config --global user.email 'github-actions[bot]@users.noreply.github.com' | ||
| git config --global user.name 'github-actions[bot]' | ||
| git fetch --all | ||
| git checkout main | ||
| npm version patch | ||
| git branch -f npmjs | ||
| git push origin main npmjs --tags |
File renamed without changes.
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
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