Skip to content

Commit

Permalink
Merge branch 'tokens/v2' into tokens/release
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverschuerch committed Jul 15, 2024
2 parents c9ba923 + 2e65671 commit 374782b
Show file tree
Hide file tree
Showing 19 changed files with 842 additions and 686 deletions.
6 changes: 6 additions & 0 deletions .changeset/2024-07-14-update-icons.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@swisspost/design-system-icons': minor
---

Added icons number 2592, 2593, 2594 and 2595.

2 changes: 1 addition & 1 deletion .github/actions/artifact-download/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ runs:
using: composite
steps:
- name: Download artifact
uses: dawidd6/action-download-artifact@v3
uses: dawidd6/action-download-artifact@v6
with:
name: ${{ inputs.name }}
run_id: ${{ github.event.workflow_run.id }}
Expand Down
71 changes: 71 additions & 0 deletions .github/workflows/build-tokens.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Build Tokens
on:
pull_request:
types: [opened, synchronize, edited, reopened]
paths:
- 'packages/tokens/**'

jobs:
build:
name: Build Tokens
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup
uses: ./.github/actions/setup-pnpm

- name: Install dependencies
run: pnpm --filter design-system-tokens... install

- name: Build tokens & dependencies
run: pnpm --filter design-system-tokens... build

- name: Create Summary
id: summary
uses: actions/github-script@v7
with:
script: |
const fs = require('fs')
const path = require('path')
const inputFileNames = fs.readdirSync('packages/tokens/tokensstudio-generated')
const inputFiles = inputFileNames.map(fileName => ({
type: path.extname(fileName),
name: fileName,
content: fs.readFileSync(`packages/tokens/tokensstudio-generated/${fileName}`, 'utf8')
}))
const outputOrder = [
'index.scss',
'core.scss',
'mode.scss',
'device.scss',
'channel.scss',
'theme.scss',
'components.scss',
]
const outputFileNames = fs.readdirSync('packages/tokens/dist')
const outputFiles = outputFileNames.map(fileName => ({
type: path.extname(fileName),
name: fileName,
content: fs.readFileSync(`packages/tokens/dist/${fileName}`, 'utf8')
})).sort((a, b) => (outputOrder.includes(a.name) ? outputOrder.indexOf(a.name) : 1000) - (outputOrder.includes(b.name) ? outputOrder.indexOf(b.name) : 1000))
return `# Token Build
## Input
${inputFiles.map(({ type, name, content }) => `<details>
<summary><code>${name}</code></summary>
<pre lang="${type}">${content}</pre>
</details>`).join('\n')}
## Output
${outputFiles.map(({ type, name, content }) => `<details>
<summary><code>${name}</code></summary>
<pre lang="${type}">${content}</pre>
</details>`).join('\n')}
`
- name: Output Summary
run: echo -e ${{ steps.summary.outputs.result }} >> $GITHUB_STEP_SUMMARY
2 changes: 1 addition & 1 deletion packages/components-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"eslint-plugin-react": "7.34.3",
"react": "18.3.1",
"react-dom": "18.3.1",
"rimraf": "5.0.7",
"rimraf": "6.0.1",
"typescript": "*"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"cypress-storybook": "1.0.0",
"eslint": "8.57.0",
"eslint-plugin-react": "7.34.3",
"rimraf": "5.0.7",
"rimraf": "6.0.1",
"rollup-plugin-postcss": "4.0.2",
"sass": "1.77.6",
"ts-jest": "29.1.5",
Expand Down
2 changes: 1 addition & 1 deletion packages/demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"karma-jasmine": "5.1.0",
"karma-jasmine-html-reporter": "2.1.0",
"raw-loader": "4.0.2",
"rimraf": "5.0.7",
"rimraf": "6.0.1",
"sass": "1.77.6",
"sockjs": "0.3.24",
"ts-node": "10.9.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/documentation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"react-syntax-highlighter": "15.5.0",
"rehype-autolink-headings": "^7.1.0",
"remark-autolink-headings": "7.0.1",
"rimraf": "5.0.7",
"rimraf": "6.0.1",
"sass": "1.77.6",
"storybook": "8.1.11",
"typescript": "5.3.3"
Expand Down
3 changes: 3 additions & 0 deletions packages/icons/public/post-icons/2592.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions packages/icons/public/post-icons/2593.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions packages/icons/public/post-icons/2594.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions packages/icons/public/post-icons/2595.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 374782b

Please sign in to comment.