From be29ac2286442517622420cd02f2d7028cdcfbf6 Mon Sep 17 00:00:00 2001 From: JrMasterModelBuilder Date: Tue, 12 Jul 2022 02:06:17 -0400 Subject: [PATCH] CI update --- .github/workflows/main.yaml | 78 +++++++++++++++++++++++++++++++++++++ .github/workflows/main.yml | 32 --------------- .nvmrc | 2 +- 3 files changed, 79 insertions(+), 33 deletions(-) create mode 100644 .github/workflows/main.yaml delete mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 0000000..8adfb2a --- /dev/null +++ b/.github/workflows/main.yaml @@ -0,0 +1,78 @@ +name: main + +on: push + +jobs: + build: + strategy: + matrix: + config: + - node-version: '10.13.0' # LTS + NO_FORMATTED: 1 + NO_LINT: 1 + NO_ESM: 1 + + - node-version: '12.13.0' # LTS + NO_FORMATTED: 1 + NO_LINT: 1 + NO_ESM: 1 + + - node-version: '14.15.0' # LTS + NO_FORMATTED: 1 + NO_LINT: 1 + + - node-version: '16.13.0' # LTS + NO_FORMATTED: 1 + NO_LINT: 1 + + - node-version: '16.16.0' # LTS (current) + + - node-version: '18.5.0' + + runs-on: ubuntu-20.04 + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Node + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.config.node-version }} + + - name: Dependencies + run: npm ci + + - name: Build + run: npm run build + + - name: Test + run: npm run test + + - name: Lint + run: npm run lint + if: matrix.config.NO_LINT != 1 + + publish: + if: startsWith(github.ref, 'refs/tags/') + needs: build + + runs-on: ubuntu-20.04 + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Node + uses: actions/setup-node@v3 + with: + node-version: '16.16.0' + registry-url: https://registry.npmjs.org/ + + - name: Dependencies + run: npm ci + + - name: Publish + run: npm publish --access=public + env: + NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 35ec131..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: main - -on: push - -jobs: - build: - strategy: - matrix: - config: - - node-version: '10.13.0' # LTS - NO_LINT: 1 - - node-version: '12.13.0' # LTS - NO_LINT: 1 - - node-version: '14.15.0' # LTS - NO_LINT: 1 - - node-version: '16.5.0' - - runs-on: ubuntu-20.04 - - steps: - - uses: actions/checkout@v2 - - - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.config.node-version }} - - - run: npm install - - run: npm run clean - - run: npm run lint - if: matrix.config.NO_LINT != 1 - - run: npm run build - - run: npm run test diff --git a/.nvmrc b/.nvmrc index c6244cd..431076a 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -14.17.3 +16.16.0