Skip to content

Commit 13e4ee5

Browse files
authored
NUI-937 Add semantic release to github action (#40)
* add semantic release to workflow * remove travis
1 parent 83cb74d commit 13e4ee5

File tree

3 files changed

+29
-53
lines changed

3 files changed

+29
-53
lines changed

.github/workflows/node.js.yml

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
22
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
33

4-
name: Node.js CI
4+
name: Node.js Test CI
55

66
on:
77
push:
@@ -13,7 +13,7 @@ jobs:
1313
build:
1414

1515
runs-on: ubuntu-latest
16-
16+
if: "!contains(github.event.head_commit.message, '[ci skip]')"
1717
strategy:
1818
matrix:
1919
node-version: [10.16, 10.19, 12.16, 12.19]
@@ -27,3 +27,28 @@ jobs:
2727
- run: npm ci
2828
- run: npm test
2929
- run: npm run report-coverage
30+
31+
sizewatcher:
32+
runs-on: ubuntu-latest
33+
if: "!contains(github.event.head_commit.message, '[ci skip]')"
34+
steps:
35+
- uses: actions/checkout@v2
36+
- run: npx @adobe/sizewatcher
37+
semantic-release:
38+
runs-on: ubuntu-latest
39+
needs: [build]
40+
if: ${{ !contains(github.event.head_commit.message, '[ci skip]') && github.ref == 'refs/heads/master' }}
41+
steps:
42+
- uses: actions/checkout@v2
43+
with:
44+
persist-credentials: false
45+
- name: Use Node.js 12.19
46+
uses: actions/setup-node@v1
47+
with:
48+
node-version: '12.19'
49+
- run: npm install
50+
- run: npm run semantic-release
51+
env:
52+
GITHUB_TOKEN: ${{ secrets.ADOBE_BOT_GITHUB_TOKEN }}
53+
NPM_TOKEN: ${{ secrets.ADOBE_BOT_NPM_TOKEN }}
54+

.travis.yml

Lines changed: 0 additions & 50 deletions
This file was deleted.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"test": "nyc mocha --recursive --exit",
3838
"posttest": "eslint . && license-checker --summary",
3939
"report-coverage": "nyc report --reporter=text-lcov > coverage.lcov && codecov",
40-
"beautify": "eslint . --fix"
40+
"beautify": "eslint . --fix",
41+
"semantic-release": "semantic-release"
4142
}
4243
}

0 commit comments

Comments
 (0)