diff --git a/.github/exclude-list.txt b/.github/exclude-list.txt new file mode 100644 index 0000000..b879b71 --- /dev/null +++ b/.github/exclude-list.txt @@ -0,0 +1,24 @@ +.git/ +.github/ +.husky/ +.vscode/ +i18n-settings +node_modules/ +screenshots/ +src/ +tmp/ +.editorconfig +.eslintrc.cjs +.gitignore +.hintrc +.prettierignore +index.html +package.json +pnpm-lock.yaml +postcss.config.js +prettier.config.js +README.md +screenshot.png +tailwind.config.js +tsconfig.json +vite.config.ts diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3126299..f996f46 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,18 +11,42 @@ jobs: name: Upload Theme runs-on: ubuntu-latest steps: + - name: Make Build Directory + run: | + pwd + mkdir -p ~/builds/tmp ~/builds/target - name: Checkout uses: actions/checkout@v2 - - name: Zip + - name: Copy Theme Files from Original to Temp + run: | + pwd + cp -r . ~/builds/tmp + - name: Remove excluded files run: | - mkdir -p ~/builds/target - zip -r howiehz-higan-cn.zip . -x .eslintrc.cjs .hintrc .prettierignore index.html package.json pnpm-lock.yaml postcss.config.js prettier.config.js .husky/\* src/\* i18n-settings/\* screenshots/\* .git/\* .github/\* node_modules/\* .gitignore .editorconfig .eslintignore .eslintrc.js .prettierrc.js .stylelintrc.js .vscode/\* .nuxt/\* .nuxtignore .env .env.development .env.production .env.test .env.local .env.development.local .env.production.local .env.test.local + pwd + cd ~/builds/tmp + pwd + cat ~/work/halo-theme-higan-hz/halo-theme-higan-hz/.github/exclude-list.txt | xargs rm -rvf + - name: Zip Theme in Chinese + run: | + pwd + cd ~/builds/tmp + pwd + zip -9 -r howiehz-higan-cn.zip ~/builds/tmp/* mv howiehz-higan-cn.zip ~/builds/target - zip -r howiehz-higan-en.zip . -x .eslintrc.cjs .hintrc .prettierignore index.html package.json pnpm-lock.yaml postcss.config.js prettier.config.js .husky/\* src/\* i18n-settings/\* screenshots/\* .git/\* .github/\* node_modules/\* .gitignore .editorconfig .eslintignore .eslintrc.js .prettierrc.js .stylelintrc.js .vscode/\* .nuxt/\* .nuxtignore .env .env.development .env.production .env.test .env.local .env.development.local .env.production.local .env.test.local settings.yaml - mv howiehz-higan-en.zip ~/builds/target + - name: Zip Theme in English + run: | + pwd + cd ~/builds/tmp + pwd rm settings.yaml - mv i18n-settings/settings.en.yaml settings.yaml - zip -r ~/builds/target/howiehz-higan-en.zip settings.yaml + + zip -9 -r howiehz-higan-en.zip ~/builds/tmp/* + + mv ~/work/halo-theme-higan-hz/halo-theme-higan-hz/i18n-settings/settings.en.yaml settings.yaml + zip -9 -r howiehz-higan-en.zip settings.yaml + + mv howiehz-higan-en.zip ~/builds/target - name: Upload Theme Build Target uses: actions/upload-artifact@v4 with: