build css in workflow
Some checks failed
Build and release / relesae (push) Failing after 45s

This commit is contained in:
Lea 2023-07-29 20:26:22 +02:00
parent 9aae26745d
commit a8b64bdf5d
Signed by: Lea
GPG key ID: 1BAFFE8347019C42
2 changed files with 40 additions and 0 deletions

View file

@ -0,0 +1,34 @@
name: Build and release
on:
push:
branches: [master]
jobs:
relesae:
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: |
apt-get install -y npm
npm install -g less
- name: Check out repository
uses: actions/checkout@v3
- name: Build CSS
run: ./build.sh
id: build
- name: Publish release
uses: actions/forgejo-release@v1
with:
direction: upload
release-dir: dist
token: ${{ github.token }}
tag: $(git rev-parse --short ${{ github.sha }})
release-notes: |
```ini
[ui]
THEMES = ${{ steps.build.outputs.themes }}
```

View file

@ -3,12 +3,18 @@
BASEDIR="$( cd "$( dirname "$0" )" && pwd )"
cd "${BASEDIR}"
theme_list=""
for theme in edge gruvbox gruvbox-material everforest; do
for variant in dark light auto; do
theme-list="$theme_list,$theme-$variant"
lessc -x "src/${theme}-${variant}.less" > "dist/theme-${theme}-${variant}.css"
done
done
for theme in nord palenight soft-era sonokai sonokai-andromeda sonokai-atlantis sonokai-espresso sonokai-maia sonokai-shusia; do
theme-list="$theme_list,$theme"
lessc -x "src/${theme}.less" > "dist/theme-${theme}.css"
done
echo "themes=$theme_list" >> $GITHUB_OUTPUT