Skip to content

Commit

Permalink
ci: embrace chaos
Browse files Browse the repository at this point in the history
  • Loading branch information
BlankParticle committed Mar 25, 2024
1 parent 98da9e6 commit 4f532da
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
run: pnpm install

- name: Build 🏗
run: pnpm build
run: pnpm build -- --no-pack

- name: Lint 🧹
run: pnpm lint
18 changes: 7 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,19 @@ on:
jobs:
release:
runs-on: ubuntu-latest
container:
image: archlinux:latest
volumes:
- /:/host
permissions:
contents: write

steps:
- 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
Expand All @@ -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 }}"
Expand Down
6 changes: 5 additions & 1 deletion tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 ./`;
},
});

0 comments on commit 4f532da

Please sign in to comment.