This commit is contained in:
parent
9aae26745d
commit
a8b64bdf5d
34
.forgejo/workflows/build-and-release.yaml
Normal file
34
.forgejo/workflows/build-and-release.yaml
Normal 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 }}
|
||||||
|
```
|
6
build.sh
6
build.sh
|
@ -3,12 +3,18 @@
|
||||||
BASEDIR="$( cd "$( dirname "$0" )" && pwd )"
|
BASEDIR="$( cd "$( dirname "$0" )" && pwd )"
|
||||||
cd "${BASEDIR}"
|
cd "${BASEDIR}"
|
||||||
|
|
||||||
|
theme_list=""
|
||||||
|
|
||||||
for theme in edge gruvbox gruvbox-material everforest; do
|
for theme in edge gruvbox gruvbox-material everforest; do
|
||||||
for variant in dark light auto; 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"
|
lessc -x "src/${theme}-${variant}.less" > "dist/theme-${theme}-${variant}.css"
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
for theme in nord palenight soft-era sonokai sonokai-andromeda sonokai-atlantis sonokai-espresso sonokai-maia sonokai-shusia; do
|
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"
|
lessc -x "src/${theme}.less" > "dist/theme-${theme}.css"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
echo "themes=$theme_list" >> $GITHUB_OUTPUT
|
||||||
|
|
Loading…
Reference in a new issue