Figma variables integration #67
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: main | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.workflow }} | |
cancel-in-progress: ${{ github.event_name != 'pull_request' }} | |
jobs: | |
verify-and-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref }} | |
fetch-depth: 0 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
cache: npm | |
cache-dependency-path: 'package-lock.json' | |
registry-url: 'https://registry.npmjs.org' | |
scope: '@zuhlke' | |
- name: Install Root | |
run: npm ci | |
- name: Build | |
run: npm run build | |
- name: Lint | |
run: npm run lint | |
- name: Analyze | |
run: npm run analyze | |
- name: Check | |
run: npm run check | |
- name: Test | |
run: npm run test | |
- name: Publish to Chromatic | |
uses: chromaui/action@latest | |
with: | |
projectToken: ${{ secrets.CHROMATIC_TOKEN }} | |
exitOnceUploaded: true | |
onlyChanged: true | |
workingDir: web-components | |
buildScriptName: 'build-storybook:chromatic' | |
autoAcceptChanges: main | |
zip: true | |
- name: Publish | |
if: github.event_name != 'pull_request' | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_DEPLOY_TOKEN }} | |
run: | | |
local_version=$(cat web-components/package.json | jq .version -r) | |
remote_version=$(npm view @zuhlke/design-system-components version) | |
if [ $local_version != $remote_version ] | |
then | |
npm publish --workspaces --access public | |
fi |