Skip to content

Merge branch 'develop' #28

Merge branch 'develop'

Merge branch 'develop' #28

Workflow file for this run

name: CI
env:
DOCKER_BUILDKIT: 1
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
create:
tags:
- '[0-9]+.[0-9]+.[0-9]+*'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build_node:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v2
- name: Set Branch
id: vars
run: echo ::set-output name=short_ref::${GITHUB_REF#refs/*/}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
- name: Cache CI node_modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}
- name: Setup packages
run: |
npm ci
- name: Test & Build
env:
GLOUD_LOG_KEY: ${{ secrets.GLOUD_LOG_KEY }}
run: |
npm run test
rm -f _auth-cloud.json
npm run build
- name: Send code coverage report to Codecov.io
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: coverage
fail_ci_if_error: true
- name: Publish to NPM
#if: github.ref == 'refs/heads/main'
if: startsWith(github.ref, 'refs/tags/')
run: |
#cp package.json build/
node copyPackageJson.js
cp README.md build/
cp LICENSE build/
cd build
npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}