Skip to content

feat: v3.2.0

feat: v3.2.0 #50

Workflow file for this run

name: Compile & Push
on:
push:
branches:
- main
workflow_dispatch:
jobs:
compile:
if: "!contains(github.event.head_commit.message, '[skip-ci]')"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: main
- uses: actions/setup-node@v3
with:
node-version: '18.x'
- name: Install Less
run: npm install -g less
- name: Install the csso
run: npm install -g csso-cli
- name: Compile Less
run: lessc ./src/DNOME.less ./dist/DNOME.css
- name: Optimize CSS
run: |
csso ./dist/DNOME.css -o ./dist/DNOME.css --comments none --stat
# csso downcases some pseudo content
# escaped characters
sed -i 's/\\a/\\A/g' ./dist/DNOME.css
- uses: actions/upload-artifact@v3
with:
name: DNOME
path: ./dist/DNOME.css
push:
if: "!contains(github.event.head_commit.message, '[skip-ci]')"
needs: [ compile ]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: dist
- uses: actions/download-artifact@v3
with:
name: DNOME
- name: Commit files
run: |
git add -f ./DNOME.css
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -am "chore: compile latest changes"
- name: Push changes
uses: ad-m/github-push-action@552c074ed701137ebd2bf098e70c394ca293e87f
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: dist