Skip to content

build(deps): bump zendesk/cache from 3.2.5 to 4.0.2 #84

build(deps): bump zendesk/cache from 3.2.5 to 4.0.2

build(deps): bump zendesk/cache from 3.2.5 to 4.0.2 #84

Workflow file for this run

name: Continuous Integration
on:
push:
branches:
- master
- main
- next
pull_request:
branches:
- '**'
jobs:
test:
name: Test
runs-on: ubuntu-latest
# runs-on: [self-hosted, zendesk-stable]
steps:
- uses: zendesk/checkout@v3
- uses: zendesk/setup-node@v3
with:
node-version: 16
- id: find-yarn-cache-folder
name: Find Yarn's cache folder
run: echo "::set-output name=path::$(yarn config get cacheFolder)"
- name: Cache Yarn's cache folder
uses: zendesk/[email protected]
with:
path: ${{ steps.find-yarn-cache-folder.outputs.path }}
key: yarn-cache-folder-os-${{ runner.os }}-node-${{ env.node-version }}-${{ hashFiles('yarn.lock') }}
restore-keys: |
yarn-cache-folder-os-${{ runner.os }}-node-${{ env.node-version }}-
yarn-cache-folder-os-${{ runner.os }}-
- name: Install dependencies and test
run: |
yarn install --immutable
yarn build
yarn test --coverage
publish:
name: Publish package to NPM
needs: test
runs-on: ubuntu-latest
# runs-on: [self-hosted, zendesk-stable]
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/next')
steps:
- uses: zendesk/checkout@v3
- uses: zendesk/setup-node@v3
with:
node-version: 16
- id: find-yarn-cache-folder
name: Find Yarn's cache folder
run: echo "::set-output name=path::$(yarn config get cacheFolder)"
- name: Cache Yarn's cache folder
uses: zendesk/[email protected]
with:
path: ${{ steps.find-yarn-cache-folder.outputs.path }}
key: yarn-cache-folder-os-${{ runner.os }}-node-${{ env.node-version }}-${{ hashFiles('yarn.lock') }}
restore-keys: |
yarn-cache-folder-os-${{ runner.os }}-node-${{ env.node-version }}-
yarn-cache-folder-os-${{ runner.os }}-
- name: Build and release
run: |
yarn install --immutable
yarn build
yarn release
env:
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}