Skip to content

chore: update CI dependencies #56

chore: update CI dependencies

chore: update CI dependencies #56

Workflow file for this run

name: main
on:
push:
tags:
- 'v*'
permissions:
contents: read
id-token: write
jobs:
build-unix:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['ubuntu-latest', 'macos-latest']
node-version: [22.x]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ~/.npm
key: npm-${{ hashFiles('package-lock.json') }}
restore-keys: npm-
- name: Install dependencies
run: |
npm ci --ignore-scripts
npm audit fix --force
npm install -g
- name: Test
run: npm test
env:
FIGMA_TOKEN: ${{ secrets.FIGMA_TOKEN }}
FIGMA_URL: ${{ secrets.FIGMA_URL }}
IS_CI: true
- name: Build
run: npm run build
- name: Run
run: npm run figmagic
#- name: Run, then check for files
# run: |
# npm run figmagic
# \[ -d .figmagic \]
# \[ -f .figmagic/figma.json \]
# env:
# FIGMA_TOKEN: ${{ secrets.FIGMA_TOKEN }}
# FIGMA_URL: ${{ secrets.FIGMA_URL }}
- name: Create Arkit diagram
run: npx arkit
- name: Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Send coverage report with Code Climate
uses: paambaati/codeclimate-action@v9.0.0
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
coverageLocations: ${{ github.workspace }}/jest-coverage/lcov.info:lcov
build-windows:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['windows-latest']
node-version: [22.x]
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ~/.npm
key: npm-${{ hashFiles('package-lock.json') }}
restore-keys: npm-
- name: Install dependencies
run: |
npm ci --ignore-scripts
npm audit fix --force
npm install -g
- name: Test
run: echo Skipping tests on Windows because of weird platform issues... #npm test
env:
FIGMA_TOKEN: ${{ secrets.FIGMA_TOKEN }}
FIGMA_URL: ${{ secrets.FIGMA_URL }}
IS_CI: true
- name: Build
run: npm run build
- name: Run
run: npm run figmagic
#- name: Run, then check for files
# run: |
# npm run figmagic
# Test-Path .figmagic
# Test-Path .figmagic/figma.json -PathType leaf
# env:
# FIGMA_TOKEN: ${{ secrets.FIGMA_TOKEN }}
# FIGMA_URL: ${{ secrets.FIGMA_URL }}
publish-npm:
needs: ['build-unix', 'build-windows']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
registry-url: https://registry.npmjs.org/
- run: |
npm ci --ignore-scripts
npm run build
git config --global user.email ${{ secrets.GIT_EMAIL }}
git config --global user.name ${{ secrets.GIT_NAME }}
npm publish --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}