Skip to content

Publish viz

Publish viz #12

Workflow file for this run

name: Publish viz
on: workflow_dispatch
jobs:
build:
uses: ./.github/workflows/viz-build.yml
publish:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
with:
name: lib
path: packages/viz/lib
- uses: actions/setup-node@v4
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
- name: "Collect release info"
run: |
node scripts/collect-release-info.js packages/viz >> "$GITHUB_ENV"
- name: "Create GitHub release"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "$RELEASE_NOTES" > "${{ runner.temp }}/notes.md"
gh release create $RELEASE_TAG --notes-file "${{ runner.temp }}/notes.md" --title "$RELEASE_TITLE" packages/viz/lib/viz-standalone.js
- run: npm install -g npm
- run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
working-directory: packages/viz