{"id":28152693,"url":"https://github.com/lando/pkg-action","last_synced_at":"2025-05-15T05:11:57.419Z","repository":{"id":42079508,"uuid":"480878433","full_name":"lando/pkg-action","owner":"lando","description":"A GitHub action that uses vercel/pkg to \"compile\" node projects into binaries","archived":false,"fork":false,"pushed_at":"2024-11-15T17:11:40.000Z","size":46,"stargazers_count":18,"open_issues_count":1,"forks_count":1,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-05-06T23:38:14.302Z","etag":null,"topics":["devops","github-actions"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lando.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["lando","pirog"],"patreon":"devwithlando","open_collective":"devwithlando","custom":"https://lando.dev/join"}},"created_at":"2022-04-12T15:57:58.000Z","updated_at":"2025-01-19T00:03:20.000Z","dependencies_parsed_at":"2023-12-14T11:01:12.198Z","dependency_job_id":"3dc7b64f-f61b-43c4-af3b-76103994cc2e","html_url":"https://github.com/lando/pkg-action","commit_stats":{"total_commits":37,"total_committers":3,"mean_commits":"12.333333333333334","dds":"0.16216216216216217","last_synced_commit":"ce6ce8498c7c3d71337e9d7e081ff6e60c3e7e53"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lando%2Fpkg-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lando%2Fpkg-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lando%2Fpkg-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lando%2Fpkg-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lando","download_url":"https://codeload.github.com/lando/pkg-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253701009,"owners_count":21949772,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["devops","github-actions"],"created_at":"2025-05-15T05:11:57.348Z","updated_at":"2025-05-15T05:11:57.410Z","avatar_url":"https://github.com/lando.png","language":"JavaScript","readme":"# Pkg Action\n\nThis is a GitHub action that allows you to \"compile\" node projects with [@yao-pkg/pkg](https://github.com/yao-pkg/pkg). It supports:\n\n* All `@yao-pkg/pkg` supported node versions\n* `x64|amd64` and `aarch64|arm64`\n* `macos|linux|windows`.\n\nIf you are also looking to code sign/notarize the resulting binaries then check out [@lando/code-sign-action](https://github.com/marketplace/actions/code-sign-action).\n\n### Caveats\n\n* If you are looking to \"cross compile\" binaries across OS **AND** architecture then we recommend you matrix strategy across this actions `os` and `arch` inputs instead of `runs-on`. This is neccessary because `arm64` compilation is currently emulated on Linux only. If you are compiling just on `amd64|x64` then it's _probably_ ok to use `runs-on`.\n* If you are looking to \"cross compile\" binaries across OS **AND** architecture **AND** code sign/notarize the resulting binaries we recommend you first upload the artifacts and then download them to the `os` you need to do the code signing.\n\nSee [Advanced Usage](#advanced-usage) below for some examples of ^.\n\n## Required Inputs\n\nThese keys must be set correctly for the action to work.\n\n| Name | Description | Example Value |\n|---|---|---|\n| `entrypoint` | The binary entrypoint path.  | `bin/entrypoint.js` |\n\n## Optional Inputs\n\nThese keys are set to sane defaults but can be modified as needed.\n\n| Name | Description | Default | Example |\n|---|---|---|---|\n| `arch` | The architecture to build for. | `${{ runner.arch }}` | `x64` \\| `amd64` \\| `aarch64` \\| `arm64` |\n| `config` | The config file to use. | `package.json` | `config.json` |\n| `filename` | The name of the resulting binary. | `${{ package.name }}` | `mycli` |\n| `node-version` | The node version to package with. | `20` | `8` \\| `10` \\| `12` \\| `14` \\| `16` \\| `18` \\| `20` |\n| `options` | Additional options and flags to pass into pkg. | `null` | Additional [pkg options](https://github.com/vercel/pkg#usage) |\n| `os` | The operating system to build for. | `${{ runner.os }}` | `linux` \\| `macos` \\| `win` |\n| `pkg` | The `pkg` package` to use. | `@yao-pkg/pkg@5.11.5` | `pkg@5.8.1` |\n| `upload` | Upload the artifacts. Useful if you need to grab them for downstream for things like code signing. | `true` | `false` \\| `true` |\n| `upload-key` | Upload key for the artifact. Useful if want to override outputs.artifact-key with a specific value. | `${{ github.event.repository.name }}-${{ inputs.node-version }}-${{ inputs.os }}-${{ inputs.arch }}-${{ github.sha }}` | `\"my-pkg\"` |\n\nNote that `.exe` will _automatically_ be appended to _all_ resulting binaries on `win`. Also note that _all_ binaries will end up in the `dist` folder.\n\n## Outputs\n\n```yaml\noutputs:\n  file:\n    description: \"The path to the generated binary.\"\n    value: ${{ steps.pkg-action.outputs.file }}\n  artifact-key:\n    description: \"The artifact upload key.\"\n    value: ${{ steps.pkg-action.outputs.artifact-key }}\n```\n\n##  Usage\n\n### Basic Usage\n\n```yaml\nname: Package into node binary\nuses: lando/pkg-action@v4\nwith:\n  entrypoint: bin/cli\n```\n\n### Advanced Usage\n\n**ALL OPTIONS**\n```yaml\nname: Package into node binary\nuses: lando/pkg-action@v4\nwith:\n  entrypoint: bin/cli\n  arch: arm64\n  config: package.json\n  node-version: 16\n  options: -C\n  os: win\n  upload: false\n  pkg: \"@yao-pkg/pkg@5.10.0\"\n```\n\n**CROSS COMPILE ON ALL THE THINGS**\n```yaml\nruns-on: ubuntu-20.04\nstrategy:\n  matrix:\n    arch:\n      - x64\n      - arm64\n    node-version:\n      - 20\n    os:\n      - linux\n      - macos\n      - win\nsteps:\n  - name: Package into node binary\n    uses: lando/pkg-action@v2\n    with:\n      entrypoint: bin/cli\n      filename: mycli\n      arch: ${{ matrix.arch }}\n      node-version: ${{ matrix.node-version }}\n      os: ${{ matrix.os }}\n```\n\n## Changelog\n\nWe try to log all changes big and small in both [THE CHANGELOG](https://github.com/lando/pkg-action/blob/main/CHANGELOG.md) and the [release notes](https://github.com/lando/pkg-action/releases).\n\n## Releasing\n\nCreate a release and publish to [GitHub Actions Marketplace](https://docs.github.com/en/enterprise-cloud@latest/actions/creating-actions/publishing-actions-in-github-marketplace). Note that the release tag must be a [semantic version](https://semver.org/).\n\n## Maintainers\n\n* [@pirog](https://github.com/pirog)\n* [@reynoldsalec](https://github.com/reynoldsalec)\n\n## Contributors\n\n\u003ca href=\"https://github.com/lando/pkg-action/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contrib.rocks/image?repo=lando/pkg-action\" /\u003e\n\u003c/a\u003e\n\nMade with [contrib.rocks](https://contrib.rocks).\n\n## Other Resources\n\n* [Important advice](https://www.youtube.com/watch?v=WA4iX5D9Z64)\n","funding_links":["https://github.com/sponsors/lando","https://github.com/sponsors/pirog","https://patreon.com/devwithlando","https://opencollective.com/devwithlando","https://lando.dev/join"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flando%2Fpkg-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flando%2Fpkg-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flando%2Fpkg-action/lists"}