diff --git a/.github/workflows/build_display_theme_cards.yml b/.github/workflows/build_display_theme_cards.yml deleted file mode 100644 index 002b0378e8..0000000000 --- a/.github/workflows/build_display_theme_cards.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Build Display Theme Cards - -on: - push: - paths: - - packages/modules/display_themes/cards/source/** - branches: - - master - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - name: Checkout Repository - uses: actions/checkout@v4 - - - name: Setup Node.js v24 - uses: actions/setup-node@v4 - with: - node-version: 24 - cache: npm - cache-dependency-path: packages/modules/display_themes/cards/source/package-lock.json - - - name: Install Dependencies and Build - run: | - cd packages/modules/display_themes/cards/source - npm install - npm run build --if-present - - - name: Commit and Push Changes - run: | - git config user.name "${{ github.actor }}" - git config user.email "${{ github.actor }}@users.noreply.github.com" - git add packages/modules/display_themes/cards/web - if ! git diff --cached --quiet; then - git commit -m "Build Display Theme: Cards" - git push - else - echo "No changes to commit." - fi diff --git a/.github/workflows/build_display_theme_colors.yml b/.github/workflows/build_display_theme_colors.yml deleted file mode 100644 index c1853cfdd1..0000000000 --- a/.github/workflows/build_display_theme_colors.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Build Display Theme Colors - -on: - push: - paths: - - packages/modules/display_themes/colors/source/** - branches: - - master - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - name: Checkout Repository - uses: actions/checkout@v4 - - - name: Setup Node.js (v22) - uses: actions/setup-node@v4 - with: - node-version: 22 - cache: npm - cache-dependency-path: packages/modules/display_themes/colors/source/package-lock.json - - - name: Install Dependencies and Build - run: | - cd packages/modules/display_themes/colors/source - npm install - npm run build --if-present - - - name: Commit and Push Changes - run: | - git config user.name "${{ github.actor }}" - git config user.email "${{ github.actor }}@users.noreply.github.com" - git add packages/modules/display_themes/colors/web - if ! git diff --cached --quiet; then - git commit -m "Build Display Theme: Colors" - git push - else - echo "No changes to commit." - fi diff --git a/.github/workflows/build_web_theme_colors.yml b/.github/workflows/build_web_theme_colors.yml deleted file mode 100644 index f0205e2e92..0000000000 --- a/.github/workflows/build_web_theme_colors.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Build Web Theme Colors - -on: - push: - paths: - - packages/modules/web_themes/colors/source/** - branches: - - master - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - name: Checkout Repository - uses: actions/checkout@v4 - - - name: Setup Node.js 24 - uses: actions/setup-node@v4 - with: - node-version: 24 - cache: npm - cache-dependency-path: packages/modules/web_themes/colors/source/package-lock.json - - - name: Install Dependencies and Build - run: | - cd packages/modules/web_themes/colors/source - npm install - npm run build --if-present - - - name: Commit and Push Changes - run: | - git config user.name "${{ github.actor }}" - git config user.email "${{ github.actor }}@users.noreply.github.com" - git add packages/modules/web_themes/colors/web - if ! git diff --cached --quiet; then - git commit -m "Build Web Theme: Colors" - git push - else - echo "No changes to commit." - fi diff --git a/.github/workflows/build_web_theme_koala.yml b/.github/workflows/build_web_theme_koala.yml deleted file mode 100644 index af99325902..0000000000 --- a/.github/workflows/build_web_theme_koala.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Build Web Theme Koala - -on: - push: - paths: - - packages/modules/web_themes/koala/source/** - branches: - - master - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - name: Checkout Repository - uses: actions/checkout@v4 - - - name: Setup Node.js 24 - uses: actions/setup-node@v4 - with: - node-version: 24 - cache: npm - cache-dependency-path: packages/modules/web_themes/koala/source/package-lock.json - - - name: Install Dependencies and Build - run: | - cd packages/modules/web_themes/koala/source - npm install - npm run build --if-present - - - name: Commit and Push Changes - run: | - git config user.name "${{ github.actor }}" - git config user.email "${{ github.actor }}@users.noreply.github.com" - git add packages/modules/web_themes/koala/web - if ! git diff --cached --quiet; then - git commit -m "Build Web Theme: Koala" - git push - else - echo "No changes to commit." - fi diff --git a/.github/workflows/publish_to_master.yml b/.github/workflows/publish_to_master.yml new file mode 100644 index 0000000000..b2a3184563 --- /dev/null +++ b/.github/workflows/publish_to_master.yml @@ -0,0 +1,64 @@ + + + +name: Publish to master +on: + push: + paths: + - packages/modules/display_themes/cards/source/** + - packages/modules/display_themes/colors/source/** + - packages/modules/web_themes/colors/source/** + - packages/modules/web_themes/koala/source/** + + +jobs: + build-and-push-themes: + runs-on: ubuntu-latest + env: + THEME_BASES: | + packages/modules/display_themes/cards/source + packages/modules/display_themes/colors/source + packages/modules/web_themes/colors/source + packages/modules/web_themes/koala/source + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Set up Node.js 24 + uses: actions/setup-node@v4 + with: + node-version: 24 + cache: npm + cache-dependency-path: | + packages/modules/display_themes/cards/source/package-lock.json + packages/modules/display_themes/colors/source/package-lock.json + packages/modules/web_themes/colors/source/package-lock.json + packages/modules/web_themes/koala/source/package-lock.json + + - name: Installiere Abhängigkeiten und baue alle Themes + run: | + for base in $THEME_BASES; do + echo "Installiere und baue Theme: $base" + cd "$base" + npm ci || npm install + npm run build + cd - + done + + - name: Commit und Push gebaute Themes + run: | + git config user.name "GitHub Actions" + git config user.email "actions@github.com" + git add packages/modules/web_themes/koala/web + git add packages/modules/web_themes/colors/web + git add packages/modules/display_themes/cards/web + git add packages/modules/display_themes/colors/web + if ! git diff --cached --quiet; then + git commit -m "Build Web Themes" + git push + else + echo "No changes to commit." + fi + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +