Skip to content

Commit

Permalink
PR/Main branch pipelines and compile-themes job
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkusJohansen committed Jan 10, 2024
1 parent a8d363d commit eb0ae08
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 28 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/actions/compile-themes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "compile-themes"
description: "Compile the .scss theme files into .css files in the build directory"

jobs:
compile:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm ci
- name: install sass dependency
run: npm install -g sass
- name: compile chimera theme
run: sass src/themes/chimera.scss build/chimera.css
- name: compile chimera-dark theme
run: sass src/themes/chimera-dark.scss build/chimera-dark.css
- name: compile chimera-golden theme
run: sass src/themes/chimera-golden.scss build/chimera-golden.css
25 changes: 25 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
on:
push:
branches:
- main

jobs:
format-prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm ci
- run: npx prettier . --write

compile-themes:
runs-on: ubuntu-latest
name: Create Sentry release
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: compile sass
uses: ./.github/actions/compile-themes
28 changes: 0 additions & 28 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,7 @@ on:
types: [created]

jobs:
format-prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm ci
- run: npx prettier . --write

compile-sass:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm ci
- name: install sass dependency
run: npm install -g sass
- name: compile chimera theme
run: sass src/themes/chimera.scss build/chimera.css
- name: compile chimera-dark theme
run: sass src/themes/chimera-dark.scss build/chimera-dark.css
- name: compile chimera-golden theme
run: sass src/themes/chimera-golden.scss build/chimera-golden.css

publish-npm:
needs: [format-prettier, compile-sass]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

on:
pull_request:
branches:
- main

jobs:
compile-themes:
runs-on: ubuntu-latest
name: Create Sentry release
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: compile sass
uses: ./.github/actions/compile-themes

0 comments on commit eb0ae08

Please sign in to comment.