Skip to content

Add fromDto() (#904) #66

Add fromDto() (#904)

Add fromDto() (#904) #66

Workflow file for this run

name: Publish NPM Package for Sysl
on:
push:
branches:
- master
paths:
- "ts/**"
- .github/workflows/npm-publish.yaml
jobs:
check-version:
runs-on: ${{ vars.RUNNER_UBUNTU && fromJSON(vars.RUNNER_UBUNTU) || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
# This one-liner will exit 1 if the current version in package.json exists in the registry.
- name: Ensure new version
run: |
! npm view @anz-bank/sysl versions --json | grep "$(node -e 'console.log(require("./package.json").version)')"
working-directory: ts
env:
NPM_CONFIG_REGISTRY: ${{ vars.NPM_CONFIG_REGISTRY }}
publish:
needs: check-version
runs-on: ${{ vars.RUNNER_UBUNTU && fromJSON(vars.RUNNER_UBUNTU) || 'ubuntu-latest' }}
if: ${{ github.repository_owner == 'anz-bank' }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: "https://registry.npmjs.org"
always-auth: true
- name: Install Project
run: yarn install --frozen-lockfile
working-directory: ts
- name: Build
run: yarn build
working-directory: ts
- name: Publish Package
run: yarn publish
working-directory: ts/dist
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}