Skip to content

Bump Pulsar (#36)

Bump Pulsar (#36) #15

Workflow file for this run

name: Deploy to PROD
on:
push:
branches: [main]
# pull_request:
# branches:
# - "main"
# workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 15
env:
TEST_API_URL: https://api.supernova.io/api/v2
TEST_API_KEY: ${{ secrets.SN_API_KEY_PROD }}
TEST_ENVIRONMENT: production
TEST_DOC_ENVIRONMENT: Live
TEST_DESIGN_SYSTEM_ID: 105994
TEST_SYNC_DESIGN_SYSTEM_ID: 105994
TEST_BRAND_ID: 69a8187b-f3d3-4b0f-a892-90afe6a92dcc
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: lts/Hydrogen
- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Build local exporter
run: cd ${{ github.workspace }}/test-resources/exporter && npm i && npm run build && cd ${{ github.workspace }}
- name: Authenticate with private NPM package
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN_READ }}" > ~/.npmrc
- name: Install dependencies
run: npm ci --skip-dev
- name: Build
run: npm run build
- name: Test
run: npm run test
- name: Authenticate with private NPM package for publish
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN_WRITE }}" > ~/.npmrc
- name: Publish to NPM
run: npm run publish-package