feat: autobuild message #18
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: write | |
id-token: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository and submodules | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: actions/setup-node@v4 | |
- run: npm install | |
- name: Install Whiskers | |
run: cargo install catppuccin-whiskers | |
- name: Generate colors | |
run: whiskers colors.tera | |
- name: Build the theme | |
run: | | |
mkdir -p dists | |
for flavor in $(ls src/generated/colors); do | |
for accent in $(ls src/generated/colors/$flavor); do | |
echo "Building $flavor/$accent" | |
mkdir -p catppuccin | |
cp src/generated/colors/$flavor/$accent src/colors.scss | |
npm run build | |
mv dist/* catppuccin/ | |
rm src/colors.scss | |
zip -r "dists/Catppuccin-${flavor}-${accent%.scss}.zip" catppuccin/* | |
rm -rf catppuccin | |
done | |
done | |
- name: Generate version tag | |
id: version_tag | |
run: | | |
TAG="prerelease-$(date +'%Y%m%d%H%M%S')" | |
echo "::set-output name=version::$TAG" | |
- name: Create a new Git tag | |
run: | | |
git fetch --tags | |
COMMIT_HASH=$(git rev-parse --short HEAD) | |
TAG="prerelease-$COMMIT_HASH" | |
git tag $TAG | |
git push origin $TAG | |
- name: Upload to GitHub Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: dists/*.zip | |
token: ${{ secrets.GITHUB_TOKEN }} | |
tag_name: ${{ steps.version_tag.outputs.version }} | |
prerelease: false | |
name: "Catppuccin for LiquidBounce (AutoBuild)" |