chore(deps): bump google.golang.org/grpc from 1.53.0 to 1.56.3 #79
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Node.js Package | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
types: | |
- opened | |
env: | |
CRAWLAB_API_ADDRESS: http://localhost:8080/api | |
PACKAGE_NAME: crawlab-sdk | |
jobs: | |
publish-npm: | |
runs-on: ubuntu-latest | |
# services: | |
# master: | |
# image: crawlabteam/crawlab | |
# env: | |
# CRAWLAB_NODE_MASTER: Y | |
# CRAWLAB_MONGO_HOST: mongo | |
# ports: | |
# - "8080:8080" | |
# - "9666:9666" | |
# mongo: | |
# image: mongo:4.2 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Get changed files | |
id: changed-files | |
uses: tj-actions/[email protected] | |
- name: Check changed files | |
run: | | |
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do | |
if [[ $file =~ ^_ext/node/.* ]]; then | |
echo "file ${file} is matched" | |
echo "is_matched=1" >> $GITHUB_ENV | |
break | |
fi | |
done | |
- name: Setup node | |
uses: actions/setup-node@v1 | |
if: ${{ env.is_matched == '1' }} | |
with: | |
node-version: '16.20' | |
registry-url: https://registry.npmjs.org/ | |
- name: Install | |
if: ${{ env.is_matched == '1' }} | |
run: | | |
cd _ext/node | |
npm install -g pnpm | |
pnpm install | |
- name: Build | |
if: ${{ env.is_matched == '1' }} | |
run: | | |
cd _ext/node | |
npm run build | |
- name: Test | |
if: ${{ env.is_matched == '1' }} | |
run: | | |
cd _ext/node | |
npm run test | |
- name: Check version | |
if: ${{ env.is_matched == '1' }} | |
run: | | |
cd _ext/node | |
version=`node -e 'const p = require("./package.json"); console.log(p.version)'` | |
res=`https://www.npmjs.com/package/${{ env.PACKAGE_NAME }}/v/${version} -i -s | grep 'HTTP/2 404' | true` | |
if [[ $res =~ 404 ]]; then | |
echo "is_matched=0" >> $GITHUB_ENV | |
else: | |
echo "is_matched=1" >> $GITHUB_ENV | |
fi | |
- name: Publish | |
if: ${{ env.is_matched == '1' }} | |
run: | | |
cd _ext/node | |
npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} |