GraphQL upgrade and deterministic enum mocks #10
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: CI & Deployment | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
release: | |
types: [published] | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
permissions: | |
id-token: write | |
contents: write | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
name: Test and Build | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.tool-versions' | |
- name: 📦 Install Dependencies | |
run: yarn install --immutable --immutable-cache | |
- name: 🧪 Tests | |
run: yarn test | |
- name: 🏗️ Build | |
run: yarn build | |
- name: Codecov | |
uses: codecov/codecov-action@v3 | |
deploy: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'release' | |
name: Deploy to npm | |
needs: [test] | |
steps: | |
- uses: actions/checkout@v4 | |
# Setup .npmrc file to publish to npm | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.tool-versions' | |
registry-url: "https://registry.npmjs.org" | |
scope: "@cruglobal" | |
- run: yarn install --immutable --immutable-cache | |
- name: 👤 Configure git | |
run: | | |
git config --global user.name 'GitHub Action' | |
git config --global user.email '[email protected]' | |
- name: 🎁 Publish package to npm | |
run: yarn publish --access public --new-version ${{ github.event.release.tag_name }} | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |