Skip to content

Build Tokens Package #20

Build Tokens Package

Build Tokens Package #20

Workflow file for this run

# Builds the tokens package to update the figma folder
name: 'Build Tokens Package'
on:
workflow_dispatch:
push:
paths: ['packages/tokens/**']
branches:
- main
jobs:
tokens-build:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.VA_MOBILE_ROBOT_GITHUB_PAT }}
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
registry-url: https://registry.npmjs.org/
node-version-file: .nvmrc
cache: yarn
cache-dependency-path: yarn.lock
- run: yarn install
- name: Build tokens
run: |
yarn tokens:build
- name: Prepare commit
working-directory: packages/tokens
run: |
git config --global user.name 'VA Automation Bot'
git config --global user.email 'va-mobileapp@adhocteam.us'
git pull
git add -f figma/
- name: Check figma diff
id: diff
working-directory: packages/tokens
run: |
git commit --dry-run
- name: No changes to figma tokens
if: failure() || steps.diff.conclusion == 'failure'
run: |
echo No changes to figma tokens
- name: Commit latest figma tokens
if: success() && steps.diff.conclusion == 'success'
working-directory: packages/tokens
run: |
git commit -m 'Build latest figma tokens'
git push
tokens-build-success:
needs: tokens-build
runs-on: ubuntu-latest
steps:
- name: Tokens Build Succeeded
if: tokens-build.steps.diff.conclusion == 'success'

Check failure on line 61 in .github/workflows/tokens-build.yml

View workflow run for this annotation

GitHub Actions / Build Tokens Package

Invalid workflow file

The workflow is not valid. .github/workflows/tokens-build.yml (Line: 61, Col: 13): Unrecognized named-value: 'tokens-build'. Located at position 1 within expression: tokens-build.steps.diff.conclusion == 'success' .github/workflows/tokens-build.yml (Line: 65, Col: 13): Unrecognized named-value: 'jobs'. Located at position 14 within expression: failure() || jobs.tokens-build.steps.diff.conclusion == 'failure'
run: |
echo Great success!
- name: Tokens Build Failure
if: failure() || jobs.tokens-build.steps.diff.conclusion == 'failure'
run: exit 1