From 4f532dad9743b7249c416f698cc7e25d827f2fc5 Mon Sep 17 00:00:00 2001 From: BlankParticle Date: Mon, 25 Mar 2024 10:27:23 +0530 Subject: [PATCH] ci: embrace chaos --- .github/workflows/ci.yml | 2 +- .github/workflows/release.yml | 18 +++++++----------- tsup.config.ts | 6 +++++- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1d831d4..bebbccf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,7 +30,7 @@ jobs: run: pnpm install - name: Build ๐Ÿ— - run: pnpm build + run: pnpm build -- --no-pack - name: Lint ๐Ÿงน run: pnpm lint diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ada4e7d..f98be01 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,6 +8,10 @@ on: jobs: release: runs-on: ubuntu-latest + container: + image: archlinux:latest + volumes: + - /:/host permissions: contents: write @@ -15,16 +19,8 @@ jobs: - name: Checkout Code ๐Ÿ›Ž uses: actions/checkout@v4 - - name: Setup pnpm ๐Ÿ“ฆ - uses: pnpm/action-setup@v2 - with: - version: "8" - - - name: Setup Node.js ๐ŸŸฉ - uses: actions/setup-node@v4 - with: - cache: "pnpm" - node-version: "20" + - name: Update pacman ๐Ÿ“ฆ + run: pacman -Sy --noconfirm gnome-shell-extensions gettext nodejs pnpm - name: Install Dependencies ๐Ÿ“ฅ run: pnpm install @@ -35,7 +31,7 @@ jobs: - name: Release ๐Ÿš€ uses: softprops/action-gh-release@v2 with: - files: dist/shell-extension.zip + files: dist/*.zip token: ${{ secrets.GITHUB_TOKEN }} tag_name: ${{ github.ref_name }} body: "Release ${{ github.ref_name }}" diff --git a/tsup.config.ts b/tsup.config.ts index 8054eb5..62e8223 100644 --- a/tsup.config.ts +++ b/tsup.config.ts @@ -27,7 +27,11 @@ export default defineConfig({ ].join("\n"), }, onSuccess: async () => { + if (process.argv.includes("--no-pack")) return; await fs.copy("./assets", "./dist"); - await $`cd dist && glib-compile-schemas schemas && zip -r ./shell-extension.zip . -9r`; + const files = (await fs.readdir("./dist")) + .filter((f) => fs.statSync(`./dist/${f}`).isFile()) + .map((file) => `--extra-source=./${file}`); + await $`cd dist && gnome-extensions pack -f ${files} -o ./`; }, });