Publish #19
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
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 | |