forgejo-themes/.forgejo/workflows/build-and-release.yaml

42 lines
1 KiB
YAML
Raw Normal View History

2023-07-29 18:26:22 +00:00
name: Build and release
on:
push:
branches: [master]
jobs:
2023-07-29 18:33:40 +00:00
release:
2023-07-29 18:26:22 +00:00
runs-on: ubuntu-latest
steps:
2023-07-29 19:04:59 +00:00
- name: Install lessc
2023-07-29 19:08:55 +00:00
run: npm install -g less
2023-07-29 18:26:22 +00:00
- name: Check out repository
uses: actions/checkout@v3
- name: Build CSS
2023-07-29 18:55:59 +00:00
run: |
mkdir dist
./build.sh
2023-07-29 19:19:10 +00:00
tar -C dist -cvf themes.tar .
mv themes.tar dist
2023-07-29 18:26:22 +00:00
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: |
2023-07-29 18:43:55 +00:00
Automatic release triggered by commit ${{ github.sha }}
Add the following to \`app.ini\`:
\`\`\`ini
2023-07-29 18:26:22 +00:00
[ui]
THEMES = ${{ steps.build.outputs.themes }}
2023-07-29 18:43:55 +00:00
\`\`\`
2023-07-29 19:20:08 +00:00
And download the CSS files from this release to \`\$GITEA_DATA_DIR/gitea/public/css\`. \`themes.tar\` contains all CSS files for convenience.