Skip to content

chore: 减小 github action 打包体积 #26

chore: 减小 github action 打包体积

chore: 减小 github action 打包体积 #26

Workflow file for this run

name: Build
on:
push:
branches:
- main
pull_request:
types: [ opened, synchronize, reopened ]
jobs:
build:
name: Upload Theme
runs-on: ubuntu-latest
steps:
- name: Make Build Directory
run: mkdir -p /builds/tmp /builds/target
- name: Checkout
uses: actions/checkout@v2
- name: Copy Theme Files from Original to Temp
run: cp -r . /builds/tmp
- name: Remove excluded files
run: |
cat /home/runner/work/halo-theme-higan-hz/halo-theme-higan-hz/.github/exclude-list.txt | xargs rm -rf
working-directory: /builds/tmp
- name: Zip Theme in Chinese
run: |
zip -9 -r howiehz-higan-cn.zip .
mv howiehz-higan-cn.zip /builds/target
working-directory: /builds/tmp
- name: Zip Theme in English
run: |
rm settings.yaml
zip -9 -r howiehz-higan-en.zip .
mv /home/runner/work/halo-theme-higan-hz/halo-theme-higan-hz/i18n-settings/settings.en.yaml settings.yaml
zip -9 -r /builds/target/howiehz-higan-en.zip settings.yaml
mv howiehz-higan-en.zip /builds/target
working-directory: /builds/tmp
- name: Upload Theme Build Target
uses: actions/upload-artifact@v4
with:
name: theme-artifact
path: /builds/target/*