Skip to content

Implement parser and typescript code generator #7

Implement parser and typescript code generator

Implement parser and typescript code generator #7

Workflow file for this run

name: 'CI-CD sails-js'
on:
pull_request:
types: [opened, synchronize, reopened, labeled]
branches: [master]
push:
branches: [master]
paths:
- js/**
workflow_dispatch:
jobs:
test:
if: github.event_name == 'pull_request'
runs-on: ubuntu-22.04
env:
RUSTUP_HOME: /tmp/rustup_home
steps:
- name: Cancel previous workflow runs
uses: styfle/cancel-workflow-action@0.4.0
with:
access_token: ${{ github.token }}
- name: Checkout
uses: actions/checkout@v3
- name: "Install: NodeJS 18.x"
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: "Install: pkg dependencies"
working-directory: js
run: yarn install
- name: "Build: sails-js"
working-directory: js
run: yarn build
- name: "Test: run"
working-directory: js
run: yarn test
publish-to-npm:
if: github.event_name == 'push'
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use node 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
- name: Check package version
uses: EndBug/version-check@v1
id: check
with:
file-name: js/package.json
file-url: https://unpkg.com/sails-js@latest/package.json
static-checking: localIsNew
- name: Install dependencies
if: steps.check.outputs.changed == 'true'
working-directory: js
run: yarn install
- name: Build sails-js
if: steps.check.outputs.changed == 'true'
working-directory: js
run: yarn build
- name: Publish
if: steps.check.outputs.changed == 'true'
working-directory: js
run: |
export token=$(printenv $(printenv GITHUB_ACTOR))
npm config set //registry.npmjs.org/:_authToken=$token
npm publish
env:
osipov-mit: ${{ secrets.OSIPOV_NPM_TOKEN }}