pontil_build

Hex.pm][shield-hex]][hexpm] [![Hex Docs][shield-docs] [ Apache 2.0Erlang Compatible

An esbuild bundler for GitHub Actions written in Gleam. Bundles your Gleam action into a single CommonJS file suitable for use with GitHub Actions.

Based on esgleam, licensed under Apache-2.0.

pontil_build is a dev dependency. It is invoked as gleam run -m pontil_build and configured entirely through gleam.toml. It will warn you if you have installed pontil_build as a regular dependency.

Usage

gleam add --dev pontil_build@1

Add bundle configuration to your gleam.toml:

[tools.pontil_build.bundle]
# All fields are optional with sensible defaults
entry = "my_action.gleam"       # relative to src/, default: {name}.gleam
outdir = "dist"                 # default: "dist"
outfile = "index.cjs"           # default: {name}.cjs
minify = true                   # true | false | ["whitespace", "syntax", "identifiers"]
esbuild_version = "0.28.0"      # default: 0.28.0
autoinstall = true              # default: true
analyze = false                 # false | true | "verbose"
legal_comments = "external"     # "none" | "inline" | "eof" | "linked" | "external"
raw = []                        # extra esbuild flags

Then bundle your action:

gleam run -m pontil_build

This produces a single .cjs file in the output directory that can be referenced from your action.yml.

Fixed Defaults

The following esbuild options are always set and not configurable:

Semantic Versioning

pontil_build follows Semantic Versioning 2.0.