Skip to content

fix docker build by adding node-gyp (#486) #168

fix docker build by adding node-gyp (#486)

fix docker build by adding node-gyp (#486) #168

Workflow file for this run

---
name: Build and Publish
on:
push:
branches:
- main
jobs:
test:
name: Build & Test
uses: ./.github/workflows/build-and-test.workflow.yml
publish:
runs-on: ubuntu-latest
needs: test
permissions:
contents: write
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup env
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'yarn'
- uses: actions/cache@v3
id: restore-build
with:
path: ./*
key: ${{ github.sha }}
# Publish to NPM
- name: Publish if version has been updated
uses: pascalgn/npm-publish-action@1.3.9
with:
tag_name: 'v%s'
tag_message: 'v%s'
commit_pattern: "^Release (\\S+)"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_AUTH_TOKEN: ${{ secrets.npm_token }}
# Publish to Github PKG
- uses: actions/setup-node@v3
with:
node-version: 14
registry-url: 'https://npm.pkg.github.com'
- name: Publish to Github PKG if version has been updated
uses: pascalgn/npm-publish-action@1.3.9
with:
create_tag: false
commit_pattern: "^Release (\\S+)"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}