Skip to content

Add linting and prettifying #6

Add linting and prettifying

Add linting and prettifying #6

Workflow file for this run

name: main
on:
push:
branches:
- main
pull_request:
branches:
- main
release:
types:
- created
jobs:
format:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: Install NodeJS
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 20
- name: Install dependencies
run: npm ci
- name: Run format
run: npm run format:check
deploy:
if: ${{ github.event_name == 'release' }}
needs: format
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: Install NodeJS
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 20
- name: Install dependencies
run: npm ci
- name: Run build
run: npm run build
- name: Upload artifacts
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
with:
name: '@passwordlessdev-passwordless-client'
path: |
dist
package.json
- name: Dispatch deployment
env:
GITHUB_TOKEN: ${{ secrets.DEPLOYMENT_GITHUB_TOKEN }}
run: >
gh workflow run passwordless-client-js
--repo bitwarden/passwordless-devops
--field repository=${{ github.repository }}
--field run-id=${{ github.run_id }}
--field name=@passwordlessdev-passwordless-client