Skip to content

TECH-1636: Fix path of npm config file (#264) #4

TECH-1636: Fix path of npm config file (#264)

TECH-1636: Fix path of npm config file (#264) #4

Workflow file for this run

# This workflow is triggered every time a change is pushed to any branches
# Github actions command reference: https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions
name: On merge to master
# The workflow could also be triggered on PRs
on:
push:
branches:
- 'master'
tags-ignore:
- '**'
jobs:
test:
name: Test Components
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
shell: bash
run: |
yarn install
- name: Run linting
shell: bash
run: |
yarn lint
- name: Run tests
shell: bash
run: |
yarn test
build:
name: Build Components
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
shell: bash
run: |
yarn install
- name: Execute yarn build
shell: bash
run: |
yarn build
publish:
name: Publish Components
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
shell: bash
run: |
yarn install
- name: Set env vars
shell: bash
run: |
echo "GITHUB_TOKEN=${{ secrets.GH_API_TOKEN }}" >> $GITHUB_ENV
echo "NPM_TOKEN=${{ secrets.NPMJS_PUBLISH_TOKEN }}" >> $GITHUB_ENV
- name: Authenticate with registry
shell: bash
run: |
echo "//registry.npmjs.org/:_authToken=${{ env.NPM_TOKEN }}" > .npmrc
- name: Execute yarn publish
shell: bash
run: |
yarn publish