build(deps): bump zendesk/cache from 3.2.5 to 4.0.2 #84
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: 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}} |