Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update workflows to package and release standalone binaries #385

Closed
wants to merge 34 commits into from

Conversation

trxcllnt
Copy link
Contributor

Opening as a draft so it isn't accidentally merged before #343.

This PR is a follow-up to #343 that updates the GHA workflows to build, test, and release the standalone binaries created by @vercel/pkg.

Modifications to dev-containers.yml:

  • Fails fast (can remove this)
  • Only run Test job when relevant files are modified
  • Cache node_modules dirs between jobs/across CI runs
  • Update CLI job to build the standalone binaries on ubuntu-20.04, macos-11, and windows-2019
  • Update Test job to run a subset of the tests on the standalone binaries (though can expand this to all tests if preferred!)

See here for an example of a successful run.

Modifications to publish-dev-containers.yml:

  • Doesn't publish the npm package if run from a repo other than @devcontainers/cli
  • Allow running workflow manually
    • Uses the most recent tag to the current commit if releasing manually
    • Allows maintainers test changes to the publish-dev-containers.yml on branches
    • Uploads artifacts to workflow run if Make GitHub Release and Make GitHub Draft Release aren't selected
  • Creates a GitHub release w/ changelog and npm package + standalone binaries (supports draft/pre-releases)

See here for an example of a successful release on tag push, and here for the release it generated.

Notes on cross-compiling

  • This PR builds the standalone packages on each target OS
    • My attempts to cross-compile Windows and signed (via ldid) MacOS binaries from Ubuntu were unsuccessful
    • The docs say this should work w/ --no-bytecode, but the binaries failed tests on the target OS
    • I can keep investigating this if it's a blocker
  • Currently only publishes x86 binaries due to the above, and

@trxcllnt
Copy link
Contributor Author

trxcllnt commented Jun 6, 2023

@trxcllnt trxcllnt closed this Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants