Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IOS-10444 Mistica importer from GH Actions #390

Merged
merged 4 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 32 additions & 18 deletions .github/workflows/generate-mistica-tokens.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,39 @@ name: Generate Mistica Tokens
on:
workflow_dispatch:

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

jobs:
get-design-tokens:
name: Get Design Tokens
runs-on: self-hosted-novum-mac
build:
name: Build & generate tokens
runs-on: ubuntu-latest
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mac is not needed!

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4

- name: Install dependencies
run: npm install
working-directory: scripts/mistica-skin-generator

- name: Generate Skin
run: make skin
- name: Generate tokens
run: npm run generate
working-directory: scripts/mistica-skin-generator

- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.NOVUM_PRIVATE_REPOS }}
add-paths: 'Sources/MisticaCommon/*'
commit-message: 'feat(skin): update design tokens'
title: 'feat(skin): update design tokens from mistica-design'
branch: 'import-design-tokens'
team-reviewers: 'ios'
delete-branch: true
draft: true
- name: Create Pull Request
id: create_pr
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.NOVUM_PRIVATE_REPOS }}
add-paths: 'Sources/MisticaCommon/*'
commit-message: 'feat(skin): update design tokens'
title: 'feat(skin): update design tokens from mistica-design'
branch: 'import-design-tokens'
team-reviewers: 'ios'
delete-branch: true
- name: Show URL in summary annotation
run: echo '::notice::Pull Request generated ${{ steps.create_pr.outputs.pull-request-url }}'
30 changes: 30 additions & 0 deletions .github/workflows/mistica-skin-generator-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Mistica skin generator tests

on:
workflow_dispatch:
push:
paths:
- 'scripts/mistica-skin-generator/**'
Comment on lines +5 to +7
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only when the generator changes


concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
name: Build & execute tests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4

- name: Install dependencies
run: npm install
working-directory: scripts/mistica-skin-generator

- name: Run tests
run: npm run test
working-directory: scripts/mistica-skin-generator
Loading