Skip to content

Commit

Permalink
bundle dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
ephys committed Apr 9, 2024
1 parent f30941b commit a0b916e
Show file tree
Hide file tree
Showing 8 changed files with 422 additions and 341 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node.js
id: setup-node
uses: actions/setup-node@v4
with:
node-version-file: package.json
cache: yarn
- name: Test Local Action
id: test-action
uses: ./
Expand Down
Binary file modified .yarn/install-state.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ outputs:
description: 'The list of PRs numbers that have merge conflicts (comma-separated list)'
runs:
using: 'node20'
main: 'lib/action.js'
main: 'lib/action.mjs'
branding:
color: 'purple'
icon: 'git-merge'
22 changes: 22 additions & 0 deletions build.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { build } from 'esbuild';

await build({
entryPoints: ['src/action.ts'],
format: 'esm',
bundle: true,
treeShaking: true,
platform: 'node',
minify: true,
banner: {
js: `
import { createRequire } from 'node:module';
import path from 'node:path';
import url from 'node:url';
const require = createRequire(import.meta.url);
const __filename = url.fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
`,
},
outfile: 'lib/action.mjs',
});
328 changes: 0 additions & 328 deletions lib/action.js

This file was deleted.

Loading

0 comments on commit a0b916e

Please sign in to comment.