Skip to content

add the gh actions setup file #23

add the gh actions setup file

add the gh actions setup file #23

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:f9e1ba7e144496a2575a03cf8abdbe518bd4e48f) : the `uses' attribute must be a path, a Docker image, or owner/repo@ref
publish-to-npm:
needs: build-and-test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@4
- 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