Update dependency fetch-mock to v11 #588
Workflow file for this run
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: build | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4 | |
with: | |
fetch-depth: "0" | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
registry-url: 'https://registry.npmjs.org' | |
scope: '@contentgrid' | |
- run: | | |
corepack enable | |
yarn install --frozen-lockfile | |
- name: Build | |
run: yarn build | |
- name: Test | |
run: yarn test | |
- name: Publish | |
if: ${{ github.ref_type == 'tag' }} | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: | |
if git branch -a --format '%(refname:short)' --contains '${{ github.sha }}' | grep -E '^origin/main$' ; then | |
git checkout main; | |
yarn lerna publish ${{ github.ref_name }} --yes --no-push --no-git-tag-version; | |
else | |
exit 1; | |
fi |