Skip to content

feat/icons

feat/icons #844

Workflow file for this run

name: Build and test and release
on:
push:
branches: [main, staging]
pull_request:
branches: [main, staging]
env:
NEXT_SECRET_GRIST_DOMAIN: ${{ secrets.NEXT_SECRET_GRIST_DOMAIN }}
NEXT_SECRET_GRIST_DOC_ID: ${{ secrets.NEXT_SECRET_GRIST_DOC_ID }}
NEXT_SECRET_GRIST_RECORDS_TABLE: ${{ secrets.NEXT_SECRET_GRIST_RECORDS_TABLE }}
NEXT_SECRET_GRIST_LABELS_TABLE: ${{ secrets.NEXT_SECRET_GRIST_LABELS_TABLE }}
NEXT_SECRET_GRIST_TEXTS_TABLE: ${{ secrets.NEXT_SECRET_GRIST_TEXTS_TABLE }}
NEXT_SECRET_GRIST_API_KEY: ${{ secrets.NEXT_SECRET_GRIST_API_KEY }}
jobs:
build:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'skip ci')"
steps:
- uses: actions/checkout@v3
- name: Set nvmrc version as .env variable
run: echo "NODE_VERSION=$(cat .nvmrc)" >> $GITHUB_ENV
- name: Use Node.js (.nvmrc)
uses: actions/setup-node@v3
with:
node-version: "${{ env.NODE_VERSION }}"
- run: npm ci
- run: npm run build --if-present
- run: npm run lint
- run: npm run type-check
- run: npm run test:ci
env:
CI: true
release:
name: semantic-release
needs: [build]
runs-on: ubuntu-latest
outputs:
new-release-published: ${{ steps.semantic-release.outputs.new_release_published }}
new-release-version: ${{ steps.semantic-release.outputs.new_release_version }}
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- name: Read .nvmrc
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)"
id: nvm
- name: Use Node.js (.nvmrc)
uses: actions/setup-node@v3
with:
node-version: ${{ steps.nvm.outputs.NVMRC }}
- run: npm ci
- id: semantic-release
uses: cycjimmy/semantic-release-action@v3
with:
semantic_version: 18
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}