2.9.1 #40
Workflow file for this run
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
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages | |
name: NPM Package | |
env: | |
NODE_VERSION: "18" | |
on: | |
push: | |
# Sequence of patterns matched against refs/tags | |
tags: | |
- "v*" # Push events to matching v*, i.e. v1.0, v20.15.10 | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 | |
- name: Setup Node | |
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 | |
with: | |
node-version: ${{env.NODE_VERSION}} | |
- run: npm ci | |
- run: npm run lint --if-present | |
test: | |
name: Unit Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 | |
- name: Setup Node | |
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 | |
with: | |
node-version: ${{env.NODE_VERSION}} | |
- run: npm ci | |
- run: npm test --if-present | |
typeCheck: | |
name: Type Check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 | |
- name: Setup Node | |
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 | |
with: | |
node-version: ${{env.NODE_VERSION}} | |
- run: npm ci | |
- run: npm run typeCheck --if-present | |
build: | |
needs: [lint, typeCheck, test] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 | |
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 | |
with: | |
node-version: ${{env.NODE_VERSION}} | |
- run: npm ci | |
- run: npm run build | |
publish-npm: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 | |
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 | |
with: | |
node-version: ${{env.NODE_VERSION}} | |
registry-url: https://registry.npmjs.org/ | |
- run: npm ci | |
- run: npm run build | |
- run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | |
deploy: | |
needs: publish-npm | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/v') | |
steps: | |
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 | |
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 | |
with: | |
node-version: ${{env.NODE_VERSION}} | |
registry-url: https://registry.npmjs.org/ | |
- run: npm ci | |
- run: npm run gh-build-release | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847 | |
with: | |
external_repository: allen-cell-animated/website-3d-cell-viewer-release | |
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }} | |
publish_dir: ./imageviewer | |
tag_name: deploy-${{ github.ref_name }} | |
tag_message: "Deployment to website-3d-cell-viewer-release ${{ github.ref_name }}" |