Add tests ci pipeline in gh actions
This commit is contained in:
commit
134c084a6d
4 changed files with 6 additions and 51 deletions
23
.github/workflows/npmpub-minor.yml
vendored
23
.github/workflows/npmpub-minor.yml
vendored
|
|
@ -1,23 +0,0 @@
|
||||||
name: Publish to NPM as minor release
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [release-minor]
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-latest]
|
|
||||||
node-version: [20.x]
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- run: npm install
|
|
||||||
- run: npm run minor
|
|
||||||
- run: cp README.md ./src/lib/dist/README.md
|
|
||||||
- uses: JS-DevTools/npm-publish@v1
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.NPM_TOKEN }}
|
|
||||||
package: './src/lib/dist/package.json'
|
|
||||||
23
.github/workflows/npmpub-patch.yml
vendored
23
.github/workflows/npmpub-patch.yml
vendored
|
|
@ -1,23 +0,0 @@
|
||||||
name: Publish to NPM as patch release
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [release-patch]
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
os: [ubuntu-latest]
|
|
||||||
node-version: [20.x]
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- run: npm install
|
|
||||||
- run: npm run patch
|
|
||||||
- run: cp README.md ./src/lib/dist/README.md
|
|
||||||
- uses: JS-DevTools/npm-publish@v1
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.NPM_TOKEN }}
|
|
||||||
package: './src/lib/dist/package.json'
|
|
||||||
|
|
@ -2,7 +2,7 @@ name: Publish to NPM as major release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [release-patch]
|
branches: [release]
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
@ -15,7 +15,7 @@ jobs:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- run: npm install
|
- run: npm install
|
||||||
- run: npm run major
|
- run: npm run pack
|
||||||
- run: cp README.md ./src/lib/dist/README.md
|
- run: cp README.md ./src/lib/dist/README.md
|
||||||
- uses: JS-DevTools/npm-publish@v1
|
- uses: JS-DevTools/npm-publish@v1
|
||||||
with:
|
with:
|
||||||
|
|
@ -10,9 +10,10 @@
|
||||||
"test:headless:singleRun": "node node_modules/@angular/cli/bin/ng test --browsers=ChromeHeadlessDebug --watch false",
|
"test:headless:singleRun": "node node_modules/@angular/cli/bin/ng test --browsers=ChromeHeadlessDebug --watch false",
|
||||||
"lint": "node node_modules/@angular/cli/bin/ng lint",
|
"lint": "node node_modules/@angular/cli/bin/ng lint",
|
||||||
"e2e": "node node_modules/@angular/cli/bin/ng e2e",
|
"e2e": "node node_modules/@angular/cli/bin/ng e2e",
|
||||||
"minor": "cd ./src/lib/ && npm version minor && ng-packagr -p package.json",
|
"release:minor": "cd ./src/lib/ && npm version minor",
|
||||||
"major": "cd ./src/lib/ && npm version major && ng-packagr -p package.json",
|
"release:major": "cd ./src/lib/ && npm version major",
|
||||||
"patch": "cd ./src/lib/ && npm version patch && ng-packagr -p package.json"
|
"release:patch": "cd ./src/lib/ && npm version patch",
|
||||||
|
"pack": "ng-packagr -p ./src/lib/package.json"
|
||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue