Skip to content

Update GitHub publish action #18

Update GitHub publish action

Update GitHub publish action #18

Workflow file for this run

name: Publish lib
on: [push]
jobs:
build:
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/')"
permissions:
packages: write
contents: read
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
registry-url: 'https://npm.pkg.github.com'
scope: '@insight-platform'
- name: Build the Docker image
run: docker build . --file projects/savant-lib/Dockerfile --tag savant-image
- name: Publish from image
run: docker run savant-image bash -c "npm config set @insight-platform:registry=https://npm.pkg.github.com; npm config set -- '//npm.pkg.github.com/:_authToken' '${{ secrets.GITHUB_TOKEN }}'; npm publish"