Skip to content

Merge pull request #26 from Wildboar-Software/fix_idm #139

Merge pull request #26 from Wildboar-Software/fix_idm

Merge pull request #26 from Wildboar-Software/fix_idm #139

Workflow file for this run

name: CLI Workflow
on:
push:
tags:
- v3.*
- v2.*
# push:
# branches:
# - main
# - master
jobs:
publish_libs:
name: Publish Libraries
runs-on: ubuntu-latest
environment: production
strategy:
fail-fast: false
matrix:
library:
- 'idm'
- 'ldap-socket'
- 'meerkat-types'
- 'x500-cli-config'
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install NPM Packages
run: npm ci
- name: Generate Prisma Client
run: npx -q prisma generate --schema=apps/meerkat/src/prisma/schema.prisma
- name: Compile ${{ matrix.library }} Library
run: npx nx run ${{ matrix.library }}:build --skip-nx-cache
# We use || true here because the version numbers will usually be the
# same between pipeline runs, so most attempted publishing will fail due
# to duplicate version numbers.
- name: Publish NPM Package
uses: JS-DevTools/npm-publish@v1
with:
package: ./dist/libs/${{ matrix.library }}/package.json
token: ${{ secrets.NPM_TOKEN }}
build_x500_cli:
name: Build the X.500 CLI
runs-on: ubuntu-latest
needs:
- publish_libs
environment: production
strategy:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install NPM Packages
run: npm ci
- name: Compile the X.500 CLI
run: npx nx run x500-cli:build:production --skip-nx-cache
- name: Publish NPM Package
uses: JS-DevTools/npm-publish@v1
with:
package: ./dist/apps/x500-cli/package.json
token: ${{ secrets.NPM_TOKEN }}