Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/siemens/ix into fix/focus-h…
Browse files Browse the repository at this point in the history
…andling
  • Loading branch information
goncalosard committed Oct 26, 2022
2 parents f0bade4 + 4f17242 commit 5f4b802
Show file tree
Hide file tree
Showing 448 changed files with 4,868 additions and 3,593 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/actions/build/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: 'Build Icons'
description: 'Build Icons'
inputs:
filter: # id of input
description: 'yarn filter property'
default: 'none'
runs:
using: 'composite'
steps:
Expand All @@ -12,13 +16,19 @@ runs:
- uses: actions/cache@v2
id: cache
with:
key: yarn-modules-${{ hashFiles('yarn.lock') }}
key: yarn-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
path: |
.yarn-cache
node_modules
packages/**/node_modules
- name: build
- name: build with filter
if: ${{ inputs.filter != 'none' }}
run: yarn build --filter ${{ inputs.filter }}
shell: bash

- name: build all
if: ${{ inputs.filter == 'none' }}
run: yarn build
shell: bash

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/actions/install/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ runs:
- uses: actions/cache@v2
id: cache
with:
key: yarn-modules-${{ hashFiles('yarn.lock') }}
key: yarn-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
path: |
.yarn-cache
node_modules
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/actions/test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ runs:
- uses: actions/cache@v2
id: cache
with:
key: yarn-modules-${{ hashFiles('yarn.lock') }}
key: yarn-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
path: |
.yarn-cache
node_modules
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/actions/visual-regression/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ runs:
if: always()
with:
name: playwright-report
path: playwright-report/
path: ./packages/core/playwright-report/
retention-days: 2
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: build

on: [push, pull_request, workflow_dispatch]
on: [push, pull_request, workflow_dispatch, workflow_call]

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

jobs:
Expand Down Expand Up @@ -33,7 +33,7 @@ jobs:
- uses: actions/cache@v2
id: build
with:
key: build-${{ github.sha }}
key: build-${{ runner.os }}-${{ github.sha }}
path: |
packages/**/dist
packages/**/www
Expand All @@ -53,7 +53,7 @@ jobs:
- uses: actions/cache@v2
id: build
with:
key: build-${{ github.sha }}
key: build-${{ runner.os }}-${{ github.sha }}
path: |
packages/**/dist
packages/**/www
Expand Down
62 changes: 62 additions & 0 deletions .github/workflows/deploy-pages-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Deploy to DEV GitHub Pages

on:
workflow_dispatch:
inputs:
confirm_deployment:
description: 'Please confirm DEV deployment'
required: true
type: boolean
repo_url:
description: 'Documentation repository'
required: true
default: danielleroux/docs-instance
type: string
prefix:
description: 'Documentation prefix'
required: true
default: /docs-instance/
type: string
jobs:
deploy:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
container:
image: node:16.16.0
env:
DEBIAN_FRONTEND: noninteractive
steps:
- uses: actions/checkout@v3
- uses: ./.github/workflows/actions/install
- uses: ./.github/workflows/actions/build
with:
filter: '\!documentation --filter \!@siemens/html-test-app'
- name: 'Download @siemens/ix-brand-theme'
run: |
rm .yarnrc
ROOT=$(pwd)
echo "@siemens:registry=https://code.siemens.com/api/v4/projects/249177/packages/npm/" >> .npmrc
echo "//code.siemens.com/api/v4/projects/249177/packages/npm/:_authToken=${{ secrets.READ_CSC_TOKEN }}" >> .npmrc
npm install @siemens/ix-brand-theme@^1.0.0 --no-save
rm .npmrc
cp -R ./node_modules/@siemens/ix-brand-theme ./packages/html-test-app/src/public/additional-theme
sed -i -e '/\"publishConfig\"/,/}/ d; /^$/d' ./packages/html-test-app/src/public/additional-theme/ix-brand-theme/package.json
rm ./packages/html-test-app/src/public/additional-theme/ix-brand-theme/package.json-e || true
- name: 'Build documentation for DEV instance'
run: |
yarn workspace @siemens/html-test-app run build
BASE_URL=${{ github.event.inputs.prefix }} yarn workspace documentation run build
- name: 'Copy DEV documentation'
run: |
mkdir -p ./public/dev
cp -R ./packages/documentation/build/. ./public
- name: Deploy documentation to DEV instance
if: ${{ github.event.inputs.confirm_deployment }}
uses: peaceiris/actions-gh-pages@v3
with:
personal_token: ${{ secrets.DEPLOY_DEV_PAGES_TOKEN }}
external_repository: ${{ github.event.inputs.repo_url }}
publish_dir: ./public
52 changes: 52 additions & 0 deletions .github/workflows/deploy-pages-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Deploy to PROD GitHub Pages

on:
workflow_dispatch:
inputs:
confirm_deployment:
description: 'Please confirm PROD deployment'
required: true
type: boolean

jobs:
deploy:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
container:
image: node:16.16.0
env:
DEBIAN_FRONTEND: noninteractive
steps:
- uses: actions/checkout@v3
- uses: ./.github/workflows/actions/install
- uses: ./.github/workflows/actions/build
with:
filter: '\!documentation --filter \!@siemens/html-test-app'
- name: 'Download @siemens/ix-brand-theme'
run: |
rm .yarnrc
ROOT=$(pwd)
echo "@siemens:registry=https://code.siemens.com/api/v4/projects/249177/packages/npm/" >> .npmrc
echo "//code.siemens.com/api/v4/projects/249177/packages/npm/:_authToken=${{ secrets.READ_CSC_TOKEN }}" >> .npmrc
npm install @siemens/ix-brand-theme@^1.0.0 --no-save
rm .npmrc
cp -R ./node_modules/@siemens/ix-brand-theme ./packages/html-test-app/src/public/additional-theme
sed -i -e '/\"publishConfig\"/,/}/ d; /^$/d' ./packages/html-test-app/src/public/additional-theme/ix-brand-theme/package.json
rm ./packages/html-test-app/src/public/additional-theme/ix-brand-theme/package.json-e || true
- name: 'Build documentation for PROD instance'
run: |
yarn workspace @siemens/html-test-app run build
yarn workspace documentation run build
- name: 'Copy PROD documentation'
run: |
cp -R ./packages/documentation/build/. ./public
- name: Deploy documentation to PROD instance
if: ${{ github.event.inputs.confirm_deployment }}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
cname: ix.siemens.io
23 changes: 0 additions & 23 deletions .github/workflows/deploy-pages.yml

This file was deleted.

36 changes: 25 additions & 11 deletions .github/workflows/pre-publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: pre-publish
name: Publish Beta

on:
push:
Expand All @@ -10,20 +10,34 @@ concurrency:
cancel-in-progress: true

jobs:
build:
build-lib:
uses: ./.github/workflows/build.yml
deploy:
needs: [build-lib]
runs-on: ubuntu-latest
container:
image: node:16.16.0
env:
DEBIAN_FRONTEND: noninteractive
steps:
- uses: actions/checkout@v3

# - uses: ./.github/workflows/actions/build

# - uses: ./.github/workflows/actions/test

# - name: Publish beta version to npmjs.org
# run: yarn publish --access public --tag beta
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- uses: actions/cache@v2
id: build
with:
key: build-${{ runner.os }}-${{ github.sha }}
path: |
packages/**/dist
packages/**/www
packages/**/loader
packages/**/build
- name: Publish beta version to npmjs.org
run: |
yarn workspace @siemens/ix publish --access public --tag beta
yarn workspace @siemens/ix-react publish --access public --tag beta
yarn workspace @siemens/ix-aggrid publish --access public --tag beta
yarn workspace @siemens/ix-echarts publish --access public --tag beta
cd packages/angular/dist
yarn publish --access public --tag beta
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
36 changes: 25 additions & 11 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: publish
name: Publish

on:
push:
Expand All @@ -10,20 +10,34 @@ concurrency:
cancel-in-progress: true

jobs:
build:
build-lib:
uses: ./.github/workflows/build.yml
deploy:
needs: [build-lib]
runs-on: ubuntu-latest
container:
image: node:16.16.0
env:
DEBIAN_FRONTEND: noninteractive
steps:
- uses: actions/checkout@v3

# - uses: ./.github/workflows/actions/build

# - uses: ./.github/workflows/actions/test

# - name: Publish to npmjs.org
# run: yarn publish --access public
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- uses: actions/cache@v2
id: build
with:
key: build-${{ runner.os }}-${{ github.sha }}
path: |
packages/**/dist
packages/**/www
packages/**/loader
packages/**/build
- name: Publish beta version to npmjs.org
run: |
yarn workspace @siemens/ix publish --access public
yarn workspace @siemens/ix-react publish --access public
yarn workspace @siemens/ix-aggrid publish --access public
yarn workspace @siemens/ix-echarts publish --access public
cd packages/angular/dist
yarn publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Loading

0 comments on commit 5f4b802

Please sign in to comment.