Skip to content

Commit

Permalink
feat: auto-build CI script
Browse files Browse the repository at this point in the history
  • Loading branch information
vzadorozhnii committed Sep 16, 2022
1 parent 1ad0236 commit b8ed882
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
36 changes: 36 additions & 0 deletions .github/workflows/tokens.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Tokens auto-build

on:
push:
paths:
- 'tokens/**'

jobs:
tokens-update:
runs-on: ubuntu-latest
strategy:
matrix:
node: [16]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Nodejs
uses: actions/setup-node@v2
with:
node-version: 16
- name: Install dependencies
run: npm ci
working-directory: tokens
- name: Run build script
run: npm run build
working-directory: tokens
- name: Create pull request for dependent project usages
id: cpr
uses: peter-evans/create-pull-request@v3
with:
commit-message: "docs: update tokens build"
title: "docs: update tokens build"
body: "Contains automated changes to tokens build, which provides css and scss variables generation."
labels: automerge
branch: design-tokens/update-tokens-build
base: zadorozhnii/auto-commit-build-tokens
3 changes: 2 additions & 1 deletion tokens/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
"main": "build-tokens.js",
"scripts": {
"build-tokens": "node build-tokens.js",
"build-scss-to-css-map": "node map-scss-to-css.js",
"replace-variables": "node replace-variables.js",
"build-scss-to-css-map": "node map-scss-to-css.js"
"build": "npm run build-tokens && npm run build-scss-to-css-map && npm run replace-variables -- -p ../src"
},
"author": "",
"license": "ISC",
Expand Down

0 comments on commit b8ed882

Please sign in to comment.