Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ export function createTsupConfig({
esbuildPlugins = [],
treeshake = false,
outDir = "dist",
loader = { ".wasm": "copy" },
publicDir = false,
loader = { ".wasm": "copy", ".yml": "copy" },
}: Options = {}) {
return defineConfig({
entry,
Expand All @@ -50,6 +51,7 @@ export function createTsupConfig({
esbuildPlugins,
treeshake,
outDir,
publicDir,
loader,
});
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ async function fetchDevVersion(pkg: string, tag: string) {
async function getReleaseEntries(dry: boolean, devTag?: string) {
const releaseEntries: ReleaseEntry[] = [];
const packageList: pnpmTree[] =
await $`pnpm list --recursive --only-projects --filter {packages/\*} --filter {utils/\*} --prod --json`.json();
await $`pnpm list --recursive --only-projects --prod --json`.json();

const commitHash = (await $`git rev-parse --short HEAD`.text()).trim();
const timestamp = Math.round(Date.now() / 1_000);
Expand Down
13 changes: 8 additions & 5 deletions utils/actions/tsup.config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import { createTsupConfig } from "../../tsup.config.js";

export default [
createTsupConfig({
entry: ["src/release-packages/index.ts"],
const createConfig = (name: string, entries: string[] = []) => {
return createTsupConfig({
entry: [`src/${name}/action.yml`, ...entries.map((entry) => `src/${name}/${entry}`)],
outDir: `dist/${name}`,
dts: false,
format: "esm",
minify: "terser",
target: "esnext",
}),
];
});
};

export default [createConfig("pnpm-install"), createConfig("release-packages", ["index.ts"])];
Loading