-
Notifications
You must be signed in to change notification settings - Fork 99
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
7 changed files
with
118 additions
and
707 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,53 @@ | ||
name: build-and-package-alpha | ||
|
||
on: | ||
push: | ||
branches: | ||
- "**/*" | ||
|
||
jobs: | ||
build-and-publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
||
- name: Fetch tags | ||
run: git fetch --prune --unshallow --tags | ||
|
||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: '12.x' | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: Install npm v7 | ||
run: npm i -g npm@7 | ||
|
||
- name: Install deps | ||
run: npm ci | ||
|
||
- name: Build | ||
run: npm run build | ||
|
||
- name: Lint | ||
run: npm run lint | ||
|
||
- name: Test | ||
run: npm t | ||
|
||
- name: publish code coverage | ||
uses: paambaati/[email protected] | ||
if: ${{ github.ref == 'refs/heads/master' }} | ||
with: | ||
coverageLocations: | | ||
${{github.workspace}}/coverage/lcov.info:lcov | ||
env: | ||
CC_TEST_REPORTER_ID: ${{ secrets.CODE_CLIMATE_REPORTER_ID }} | ||
|
||
- name: Set version | ||
run: | | ||
npm version --no-git-tag-version $(git describe --abbrev=0 --tags)-alpha.$(git rev-parse --short=6 ${{ github.sha }}) | ||
- run: npm publish --tag alpha | ||
env: | ||
NODE_AUTH_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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: coverage | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
jobs: | ||
coverage: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: artiomtr/[email protected] | ||
with: | ||
github-token: ${{ secrets.GH_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,47 @@ | ||
name: release | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Fetch tags | ||
run: git fetch --prune --unshallow --tags | ||
|
||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: '12.x' | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: Install npm v7 | ||
run: npm i -g npm@7 | ||
|
||
- name: Install deps | ||
run: npm ci | ||
|
||
- name: Build | ||
run: npm run build | ||
|
||
- name: Set version | ||
run: | | ||
npm version --no-git-tag-version $(git describe --abbrev=0 --tags) | ||
- name: Commit version change | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
git commit -m "update version" -a | ||
- name: Push | ||
uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.GH_TOKEN }} | ||
|
||
- run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.