50 lines
1.4 KiB
YAML
50 lines
1.4 KiB
YAML
name: Build and release
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Install lessc
|
|
run: npm install -g less
|
|
|
|
- name: Check out repository
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Parse commit hash
|
|
run: echo "RELEASE_TAG=$(git rev-parse --short ${{ github.sha }})" >> $GITHUB_ENV
|
|
|
|
- name: Build CSS
|
|
run: |
|
|
mkdir dist
|
|
./build.sh
|
|
tar -C dist -cvf themes.tar .
|
|
mv themes.tar dist
|
|
id: build
|
|
|
|
- name: Publish release
|
|
uses: actions/forgejo-release@v1
|
|
with:
|
|
direction: upload
|
|
release-dir: dist
|
|
token: ${{ github.token }}
|
|
tag: $RELEASE_TAG
|
|
release-notes: |
|
|
Automatic release triggered by commit ${{ github.sha }}
|
|
|
|
Add the following to \`app.ini\`:
|
|
\`\`\`ini
|
|
[ui]
|
|
THEMES = ${{ steps.build.outputs.themes }}
|
|
\`\`\`
|
|
|
|
And download the CSS files from this release to \`\$GITEA_DATA_DIR/gitea/public/css\`. [\`themes.tar\`](/Lea/gitea-themes/releases/download/$RELEASE_TAG/themes.tar) contains all CSS files for convenience.
|
|
|
|
Quick download (drops CSS files in your current directory):
|
|
\`\`\`bash
|
|
curl https://git.amogus.cloud/Lea/forgejo-themes/releases/download/$RELEASE_TAG/themes.tar | tar -xvf -
|
|
\`\`\`
|