-
-
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
2 changed files
with
108 additions
and
0 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,69 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- stable | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-18.04 | ||
outputs: | ||
version: ${{ env.VERSION }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
- run: echo "::set-env name=VERSION::$(jq '.version' package.json)" | ||
- run: yarn install | ||
- run: yarn build | ||
- run: yarn pack --filename artifact.tgz | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: artifact | ||
path: artifact.tgz | ||
- run: yarn ci | ||
|
||
npm-publish: | ||
runs-on: ubuntu-18.04 | ||
needs: build | ||
steps: | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
registry-url: 'https://registry.npmjs.org' | ||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: artifact | ||
path: /tmp | ||
- run: tar xvzf /tmp/artifact.tgz | ||
- run: yarn publish ./package | ||
env: | ||
VERSION: ${{ fromJSON(needs.build.outputs.version) }} | ||
NODE_AUTH_TOKEN: ${{ secrets.npm_token }} | ||
|
||
tag-release: | ||
runs-on: ubuntu-18.04 | ||
needs: [build, npm-publish] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Create TAG | ||
run: | | ||
git tag $RELEASE | ||
git push --follow-tags | ||
env: | ||
release: v${{ fromJSON(needs.build.outputs.version) }} | ||
|
||
gh-release: | ||
runs-on: ubuntu-18.04 | ||
needs: [build, npm-publish] | ||
steps: | ||
- name: Create GitHub Release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: v${{ fromJSON(needs.build.outputs.version) }} | ||
release_name: Release ${{ fromJSON(needs.build.outputs.version) }} | ||
body: Release ${{ fromJSON(needs.build.outputs.version) }} |
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,39 @@ | ||
name: Test | ||
|
||
on: | ||
- push | ||
- pull_request | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
os: [ ubuntu-18.04 ] | ||
node: [ 10, 12 ] | ||
name: Test Nodejs v${{ matrix.node }} on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
- run: yarn install | ||
- run: yarn build | ||
- run: yarn ci | ||
- name: Publish Coveralls | ||
uses: coverallsapp/github-action@v1.1.1 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
flag-name: run-nodejs-v${{ matrix.node }}-${{ matrix.os }} | ||
parallel: true | ||
|
||
finish: | ||
name: Finish | ||
needs: build | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- name: Coveralls Finished | ||
uses: coverallsapp/github-action@v1.1.1 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
parallel-finished: true |