-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into dependabot/npm_and_yarn/rxjs-7.8.1
- Loading branch information
Showing
24 changed files
with
848 additions
and
467 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,45 @@ | ||
name: Publish NPM Package | ||
on: | ||
release: | ||
types: | ||
- released | ||
|
||
jobs: | ||
publish: | ||
# check for version in the release tag - example: v1.0.0 | ||
if: contains(github.event.release.tag_name, '^v[0-9]+\.[0-9]+\.[0-9]') | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [16.14.2] | ||
|
||
steps: | ||
- name: Checkout 🛎️ | ||
uses: actions/checkout@v3 | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'npm' | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
# TODO - find better approch to install the peer dependencies for local developement | ||
- name: Link lib | ||
run: npm link ./projects/password-strength-meter | ||
|
||
- name: Build - Lib | ||
run: npm run build:lib:prod | ||
|
||
- name: Get package version | ||
id: package-version | ||
uses: martinbeentjes/npm-get-version-action@master | ||
|
||
- name: Publish to npm | ||
run: npm publish dist/password-strength-meter/ | ||
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 |
---|---|---|
|
@@ -30,14 +30,21 @@ jobs: | |
- name: Install dependencies | ||
run: npm ci | ||
|
||
# TODO - find better approch to install the peer dependencies for local developement | ||
- name: Link lib | ||
run: npm link ./projects/password-strength-meter | ||
|
||
- name: Lint | ||
run: npm run lint | ||
|
||
- name: Build | ||
run: npm run build:lib:prod | ||
|
||
- name: Unit Test - Lib | ||
run: npm run test:lib -- -- --watch=false --browsers=ChromeHeadless | ||
|
||
- name: Unit Test - App | ||
run: npm run build:lib:prod && npm run test:app -- -- --watch=false --browsers=ChromeHeadless | ||
run: npm run test:app -- -- --watch=false --browsers=ChromeHeadless | ||
|
||
- name: Coveralls | ||
uses: coverallsapp/[email protected] | ||
|
@@ -67,6 +74,10 @@ jobs: | |
- name: Install dependencies | ||
run: npm ci | ||
|
||
# TODO - find better approch to install the peer dependencies for local developement | ||
- name: Link lib | ||
run: npm link ./projects/password-strength-meter | ||
|
||
- name: Build - Lib | ||
run: npm run build:lib:prod | ||
|
||
|
@@ -78,45 +89,3 @@ jobs: | |
with: | ||
branch: gh-pages # The branch the action should deploy to. | ||
folder: docs # The folder the action should deploy. | ||
|
||
publish: | ||
needs: deploy | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [16.14.2] | ||
|
||
steps: | ||
- name: Checkout 🛎️ | ||
uses: actions/checkout@v3 | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'npm' | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
|
||
- name: Build - Lib | ||
run: npm run build:lib:prod | ||
|
||
- name: Get package version | ||
id: package-version | ||
uses: martinbeentjes/npm-get-version-action@master | ||
|
||
- name: Create release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
tag: v${{ steps.package-version.outputs.current-version}} | ||
commit: ${{ github.sha }} | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Publish to npm | ||
run: npm publish dist/password-strength-meter/ | ||
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
Oops, something went wrong.