Skip to content

0.3.0

0.3.0 #13

Workflow file for this run

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: [20]
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: Matrix Node Version
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 clean-install
- name: Test
run: CI=true npm run test
- name: Build
run: CI=true npm run prepublishOnly
- 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"