-
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
68 additions
and
58 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,68 @@ | ||
name: password-strength | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- '*' | ||
tags: | ||
- '*' | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
WEBCLIENTNAME: 'password-strength' | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
WEBCLIENTNAME: ${{ env.WEBCLIENTNAME }} | ||
strategy: | ||
matrix: | ||
node_version: [16] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Cache node modules | ||
id: cache-npm | ||
uses: actions/cache@v3 | ||
env: | ||
cache-name: cache-node-modules | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-build-${{ env.cache-name }}- | ||
${{ runner.os }}-build- | ||
${{ runner.os }}- | ||
- name: Set up NodeJS | ||
uses: actions/setup-node@v3 | ||
with: | ||
always-auth: true | ||
node-version: ${{ matrix.node_version }} | ||
- name: Set up NPM authentication | ||
run: echo "//registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN" > ~/.npmrc | ||
- name: Install dependencies | ||
run: CI=true npm ci | ||
- name: Test | ||
run: CI=true npm run test | ||
- name: Build | ||
run: CI=true npm run build | ||
- name: NPM publish | ||
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }} | ||
run: CI=true npm publish | ||
slack-notification: | ||
needs: [build] | ||
if: always() | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
- name: Run Slack Notification | ||
uses: actano/slack-action@master | ||
env: | ||
SLACK_BOT_TOKEN: ${{ secrets.SLACK_TOKEN }} | ||
SLACK_CHANNEL: "a-team-ci" | ||
GITHUB_TOKEN: ${{ secrets.ACTANO_GITHUB_TOKEN }} | ||
GITHUB_RUN_ID: ${{ github.run_id }} | ||
REPO_OWNER: ${{ github.repository_owner }} | ||
REPO_NAME: ${{ github.event.repository.name }} | ||
RUN_ID: ${{ github.run_id }} | ||
SEND_SUCCESS_MESSAGE: "true" |
This file was deleted.
Oops, something went wrong.