Skip to content

add the gh actions setup file #18

add the gh actions setup file

add the gh actions setup file #18

name: facebook/metro/build-and-deploy
on:
push:
defaults:
run:
shell: bash
jobs:
build-and-test:
uses: ./.github/workflows/build-and-test.yml

Check failure on line 11 in .github/workflows/build-and-deploy.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/build-and-deploy.yml

Invalid workflow file

error parsing called workflow ".github/workflows/build-and-deploy.yml" -> "./.github/workflows/build-and-test.yml" (source branch with sha:f355a254fc4a7dd1c3a1356913b1b60b5ae13fc6) : workflow is not reusable as it is missing a `on.workflow_call` trigger
publish-to-npm:
needs: build-and-test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- uses: ./.github/actions/yarn-install
with:
use-min-supported-version: true
- name: Check Tag Format
id: check_tag
run: |
if [[ $GITHUB_REF =~ ^refs/tags/v\d+(\.\d+){2}(-.*)?$ ]]; then
echo "valid=true" >> $GITHUB_OUTPUT
else
echo "valid=false" >> $GITHUB_OUTPUT
fi
- run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> ~/.npmrc
- name: Infer dist-tag and run npm run publish
if: steps.check_tag.outputs.valid == 'true'
run: "./.circleci/scripts/publish.sh"
- run: rm ~/.npmrc