-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1132 from City-of-Helsinki/development
release-3.0.0
- Loading branch information
Showing
1,834 changed files
with
21,762 additions
and
16,565 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
# Build icon library, create zip file for release and create PR | ||
name: icon library | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-icon-library: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Node.js environment | ||
uses: actions/setup-node@v3.6.0 | ||
with: | ||
node-version: '20.3.1' | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: Run Glypfig | ||
run: | | ||
npx glypfig \ | ||
--apikey $API_KEY \ | ||
--filekey $FILE_KEY \ | ||
--nodeid $NODE_ID \ | ||
--format png,svg,css,react \ | ||
--optimize \ | ||
--template tsx \ | ||
--csspath './release/icon-kit-template-css.eta' \ | ||
--jspath './release/icon-kit-template-react-tsx.eta' \ | ||
--cssprefix '' \ | ||
--license './release/LICENSE.txt' \ | ||
--pngscale 2.66 \ | ||
--filter 'Size=S' | ||
env: | ||
API_KEY: ${{ secrets.HDS_ICON_KIT }} | ||
FILE_KEY: 'Kxwg3R0zNRHj55nQqFu6VS' | ||
NODE_ID: '172:2478' | ||
|
||
- name: Append React interface into index file | ||
run: | | ||
echo -e "export { IconProps } from './Icon.interface';\n" | \ | ||
cat - ./icon-library/react/tsx/index.ts > temp && mv temp ./icon-library/react/tsx/index.ts | ||
- name: Bump version in Changelog | ||
run: | | ||
PKG_VER=`node -pe "require('./packages/react/package.json').version"` | ||
sed -i -E "s/version [0-9]{1,2}.[0-9]{1,2}.[0-9]{1,2}/version ${PKG_VER}/" ./release/icon-kit-template-CHANGELOG.txt | ||
- name: Copy Changelog file to icon library | ||
run: cp ./release/icon-kit-template-CHANGELOG.txt ./icon-library/CHANGELOG.txt | ||
|
||
- name: Create release zip file | ||
uses: TheDoctor0/zip-release@0.7.1 | ||
with: | ||
filename: 'release/hds-icon-kit.zip' | ||
path: './icon-library' | ||
|
||
- name: Copy svg files to repo folders | ||
run: cp ./icon-library/svg/* ./packages/core/src/svg | ||
|
||
- name: Copy css files to repo folders | ||
run: cp ./icon-library/css/* ./packages/core/src/icons | ||
|
||
- name: Copy react files to repo folders | ||
run: cp ./icon-library/react/tsx/* ./packages/react/src/icons | ||
|
||
- name: Install React package NPM dependencies | ||
run: (cd ./packages/react && yarn) | ||
|
||
- name: Lint React files | ||
run: npx prettier --write './packages/react/src/icons/*.{ts,tsx}' | ||
|
||
- name: Code analysis for React files | ||
run: npx eslint --debug -c './packages/react/.eslintrc.json' --ignore-path './packages/react/.eslintignore' --fix './packages/react/src/icons/*.{ts,tsx}' | ||
|
||
- name: Remove icon library build directory | ||
run: rm -rf ./icon-library | ||
|
||
- name: Commit changed files | ||
run: | | ||
git config --global user.email "hds@hel.fi" | ||
git config --global user.name "Github Actions" | ||
git add . | ||
git commit -m 'Updated icon library' | ||
git push | ||
- name: create pull request | ||
run: gh pr create -B development --title 'Icon library build' --body 'Created by Github action icon library' | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: prerelease | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
prerelease_stage: | ||
description: 'alpha or beta' | ||
required: true | ||
|
||
jobs: | ||
build-deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Read .nvmrc | ||
run: echo "NODE_VERSION=$(cat .nvmrc)" >> $GITHUB_OUTPUT | ||
id: nvmrc | ||
|
||
- name: setup node ${{ steps.nvmrc.outputs.NODE_VERSION }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '${{ steps.nvmrc.outputs.NODE_VERSION }}' | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: install dependencies | ||
run: yarn | ||
|
||
- name: build design tokens package | ||
run: yarn build | ||
working-directory: ./packages/design-tokens | ||
|
||
- name: build core package | ||
run: yarn build | ||
working-directory: ./packages/core | ||
|
||
- name: build react package | ||
run: yarn build | ||
working-directory: ./packages/react | ||
|
||
- name: release npm packages | ||
run: yarn run release --dist-tag ${{ github.event.inputs.prerelease_stage }} | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ | |
lib | ||
node_modules | ||
.idea/ | ||
.vscode/ |
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
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
4 changes: 2 additions & 2 deletions
4
packages/core/src/components/breadcrumb/breadcrumb.stories.js
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
Oops, something went wrong.