Merge pull request #9 from insight-platform/github-actions #15
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: 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 version patch; npm publish" |