Skip to content

Publish

Publish #17

Workflow file for this run

name: Publish
on:
workflow_dispatch:
jobs:
quality_checks:
uses: Optum/react-hooks/.github/workflows/quality-checks.yml@main
publish:
runs-on: ubuntu-latest
needs: quality_checks
steps:
- name: Verify main branch
if: github.ref_name != 'main'
run: |
echo "Invalid branch: can only publish from main"
exit 1
- name: Setup
uses: Optum/react-hooks/.github/actions/setup@main
- name: Publish
run: |
yarn config set npmAuthToken ${{ secrets.NPM_AUTH_TOKEN }} -H
yarn npm publish