Skip to content

Bump protobufjs from 6.11.3 to 7.2.4 #224

Bump protobufjs from 6.11.3 to 7.2.4

Bump protobufjs from 6.11.3 to 7.2.4 #224

Workflow file for this run

name: Build
on:
push:
branches:
- "*"
tags-ignore:
- "v*"
pull_request:
branches:
- master
workflow_dispatch: {}
jobs:
build:
name: Node.js v${{ matrix.node-version }} on ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
node-version: [14.x, 16.x]
os: [ubuntu-latest, macOS-latest, windows-latest]
runs-on: ${{ matrix.os }}
env:
CI: true
steps:
# - name: Set git config
# if: runner.os == 'Windows'
# shell: bash
# run: git config --global core.autocrlf true
- uses: actions/checkout@v2
- name: echo github.ref
run: echo ${{ github.ref }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Use NPM 8
run: npm install -g npm@8.3.1 # lock to 8.3.1 until actions/setup-node#411 and npm/cli#4341 are fixed
- name: Set version number of package.json and build artifact
id: version_step
if: runner.os == 'macOS'
env:
RUN_NUMBER: ${{ github.run_number }}
run: |
PACKAGE_VERSION=$(node -p "require('./package.json').version")
echo "version=$PACKAGE_VERSION"
PR_NUMBER=$(jq --raw-output ".pull_request.number" "$GITHUB_EVENT_PATH")
echo "prNumber=$PR_NUMBER"
if [ "$PR_NUMBER" != "null" ]; then
VERSION_STRING=${PACKAGE_VERSION}-pr${PR_NUMBER}-$(git rev-parse --short HEAD)
else
VERSION_STRING=${PACKAGE_VERSION}-nightly-$(git rev-parse --short HEAD)
fi
npm version --no-git-tag-version $VERSION_STRING
echo "::set-output name=version_build::${VERSION_STRING}+${RUN_NUMBER}"
- name: Get npm cache directory
id: npm-cache-dir
run: |
echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v2
id: npm-cache
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-${{ matrix.node-version }}-
- name: Install dependencies
run: "npm ci"
- name: Lint, compile and test
run: "node node_modules/gulp/bin/gulp.js lint test"
if: runner.os != 'macOS'
- name: Lint, compile, test and package
run: "node node_modules/gulp/bin/gulp.js package"
if: runner.os == 'macOS'
- name: Publish code coverage report
uses: codecov/codecov-action@v1
if: runner.os == 'macOS'
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: "**/coverage/*.json"
flags: unittest
name: codecov
- name: Upload artifact
uses: actions/upload-artifact@v2
if: runner.os == 'macOS'
with:
name: vrealize-developer-tools-${{steps.version_step.outputs.version_build}}.vsix
path: "*.vsix"