Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: moonrepo/proto
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.37.0
Choose a base ref
...
head repository: moonrepo/proto
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Jun 17, 2024

  1. Copy the full SHA
    0c40b0c View commit details
  2. Copy the full SHA
    35fbe1b View commit details

Commits on Jun 18, 2024

  1. docs: Fix changelog.

    milesj committed Jun 18, 2024
    Copy the full SHA
    9f47402 View commit details
  2. chore: Release

    milesj committed Jun 18, 2024
    Copy the full SHA
    4c831f7 View commit details

Commits on Jun 19, 2024

  1. Copy the full SHA
    3288648 View commit details
  2. chore: Release

    milesj committed Jun 19, 2024
    Copy the full SHA
    64c2bba View commit details

Commits on Jun 20, 2024

  1. Copy the full SHA
    366d65c View commit details

Commits on Jun 21, 2024

  1. new: Add fzf plugin. (#524)

    suin authored Jun 21, 2024
    Copy the full SHA
    dcdb91c View commit details
  2. Add buildifier plugin (#525)

    suin authored Jun 21, 2024
    Copy the full SHA
    312e314 View commit details
  3. Add mise plugin (#526)

    suin authored Jun 21, 2024
    Copy the full SHA
    038de0a View commit details
  4. Add yq plugin (#527)

    suin authored Jun 21, 2024
    Copy the full SHA
    38459f6 View commit details
  5. Add sccache plugin (#528)

    suin authored Jun 21, 2024
    Copy the full SHA
    d1930f7 View commit details
  6. tests: Fix flaky test.

    milesj committed Jun 21, 2024
    Copy the full SHA
    47becc3 View commit details

Commits on Jun 23, 2024

  1. Copy the full SHA
    ca16c20 View commit details

Commits on Jun 27, 2024

  1. Add direnv plugin (#531)

    kahirokunn authored Jun 27, 2024
    Copy the full SHA
    944a26d View commit details

Commits on Jul 1, 2024

  1. Copy the full SHA
    51b41dd View commit details
  2. internal: Run generator.

    milesj committed Jul 1, 2024
    Copy the full SHA
    09484c9 View commit details
  3. chore: Release

    milesj committed Jul 1, 2024
    Copy the full SHA
    66e77a7 View commit details
  4. deps: Bump rust plugin.

    milesj committed Jul 1, 2024
    Copy the full SHA
    c11f59b View commit details
  5. chore: Release

    milesj committed Jul 1, 2024
    Copy the full SHA
    ab045d1 View commit details

Commits on Jul 3, 2024

  1. Copy the full SHA
    6fc22bb View commit details

Commits on Jul 4, 2024

  1. Copy the full SHA
    5a3e579 View commit details
  2. chore: Release

    milesj committed Jul 4, 2024
    Copy the full SHA
    36200e2 View commit details
  3. Copy the full SHA
    cdff60f View commit details
  4. docs: Update changelog.

    milesj committed Jul 4, 2024
    Copy the full SHA
    52c9346 View commit details
  5. chore: Release

    milesj committed Jul 4, 2024
    Copy the full SHA
    9aa9dbc View commit details
  6. chore: Release

    milesj committed Jul 4, 2024
    Copy the full SHA
    32e72d9 View commit details
  7. chore: Release

    milesj committed Jul 4, 2024
    Copy the full SHA
    3020e36 View commit details
  8. chore: Release

    milesj committed Jul 4, 2024
    Copy the full SHA
    4cb6e33 View commit details

Commits on Jul 7, 2024

  1. chore: Release

    milesj committed Jul 7, 2024
    Copy the full SHA
    41efa33 View commit details
  2. chore: Release

    milesj committed Jul 7, 2024
    Copy the full SHA
    58008c1 View commit details
  3. Copy the full SHA
    ed98103 View commit details
  4. chore: Release

    milesj committed Jul 7, 2024
    Copy the full SHA
    efa7c07 View commit details

Commits on Jul 8, 2024

  1. Copy the full SHA
    b0bab5d View commit details
  2. chore: Release

    milesj committed Jul 8, 2024
    Copy the full SHA
    2225d46 View commit details
  3. deps: Bump node plugins.

    milesj committed Jul 8, 2024
    Copy the full SHA
    e0786a8 View commit details
  4. chore: Release

    milesj committed Jul 8, 2024
    Copy the full SHA
    feae189 View commit details

Commits on Jul 11, 2024

  1. chore: Release

    milesj committed Jul 11, 2024
    Copy the full SHA
    c55436a View commit details

Commits on Jul 13, 2024

  1. Copy the full SHA
    1cc5187 View commit details

Commits on Jul 14, 2024

  1. Copy the full SHA
    1ffaa96 View commit details
  2. chore: Release

    milesj committed Jul 14, 2024
    Copy the full SHA
    de3803e View commit details

Commits on Jul 17, 2024

  1. deps: Audit 07/17 (#552)

    milesj authored Jul 17, 2024
    Copy the full SHA
    2f74e7c View commit details
  2. chore: Release

    milesj committed Jul 17, 2024
    Copy the full SHA
    8eef121 View commit details

Commits on Jul 24, 2024

  1. Copy the full SHA
    cac1e8e View commit details
  2. chore: Release

    milesj committed Jul 24, 2024
    Copy the full SHA
    f919dc3 View commit details

Commits on Jul 26, 2024

  1. Copy the full SHA
    68d1cc9 View commit details
  2. Copy the full SHA
    9789648 View commit details
  3. Copy the full SHA
    4bcf4c0 View commit details
  4. Copy the full SHA
    a58216f View commit details
  5. Copy the full SHA
    690e0e5 View commit details
Showing with 12,221 additions and 6,810 deletions.
  1. +1 −8 .github/ISSUE_TEMPLATE/bug_report.yml
  2. +9 −3 .github/workflows/ci.yml
  3. +1 −0 .github/workflows/nightly.yml
  4. +62 −46 .github/workflows/release.yml
  5. +1 −0 .prototools
  6. +511 −7 CHANGELOG.md
  7. +1,528 −988 Cargo.lock
  8. +37 −57 Cargo.toml
  9. +6 −0 README.md
  10. +26 −17 crates/cli/Cargo.toml
  11. +35 −17 crates/cli/src/app.rs
  12. +259 −0 crates/cli/src/commands/activate.rs
  13. +20 −15 crates/cli/src/commands/alias.rs
  14. +25 −10 crates/cli/src/commands/bin.rs
  15. +55 −26 crates/cli/src/commands/clean.rs
  16. +3 −4 crates/cli/src/commands/completions.rs
  17. +5 −4 crates/cli/src/commands/debug/config.rs
  18. +1 −1 crates/cli/src/commands/debug/env.rs
  19. +44 −25 crates/cli/src/commands/diagnose.rs
  20. +445 −166 crates/cli/src/commands/install.rs
  21. +0 −98 crates/cli/src/commands/install_all.rs
  22. +2 −3 crates/cli/src/commands/list.rs
  23. +2 −3 crates/cli/src/commands/list_remote.rs
  24. +3 −3 crates/cli/src/commands/mod.rs
  25. +20 −18 crates/cli/src/commands/outdated.rs
  26. +13 −17 crates/cli/src/commands/pin.rs
  27. +42 −11 crates/cli/src/commands/plugin/add.rs
  28. +65 −39 crates/cli/src/commands/plugin/info.rs
  29. +2 −2 crates/cli/src/commands/plugin/list.rs
  30. +14 −8 crates/cli/src/commands/plugin/remove.rs
  31. +5 −4 crates/cli/src/commands/plugin/search.rs
  32. +11 −17 crates/cli/src/commands/regen.rs
  33. +59 −86 crates/cli/src/commands/run.rs
  34. +36 −23 crates/cli/src/commands/setup.rs
  35. +86 −40 crates/cli/src/commands/status.rs
  36. +19 −11 crates/cli/src/commands/unalias.rs
  37. +7 −12 crates/cli/src/commands/uninstall.rs
  38. +22 −14 crates/cli/src/commands/unpin.rs
  39. +165 −55 crates/cli/src/commands/upgrade.rs
  40. +23 −8 crates/cli/src/error.rs
  41. +115 −25 crates/cli/src/helpers.rs
  42. +44 −41 crates/cli/src/main.rs
  43. +2 −1 crates/cli/src/main_shim.rs
  44. +12 −10 crates/cli/src/printer.rs
  45. +47 −15 crates/cli/src/session.rs
  46. +41 −47 crates/cli/src/shell.rs
  47. +78 −6 crates/cli/src/systems.rs
  48. +88 −0 crates/cli/src/utils/install_graph.rs
  49. +1 −0 crates/cli/src/utils/mod.rs
  50. +103 −0 crates/cli/tests/activate_test.rs
  51. +77 −50 crates/cli/tests/alias_test.rs
  52. +42 −42 crates/cli/tests/bin_test.rs
  53. +47 −40 crates/cli/tests/clean_test.rs
  54. +23 −0 crates/cli/tests/fixtures/moon-schema.json
  55. +18 −0 crates/cli/tests/fixtures/moon-schema.yaml
  56. +21 −0 crates/cli/tests/general_test.rs
  57. +144 −0 crates/cli/tests/install_all_test.rs
  58. +332 −212 crates/cli/tests/install_uninstall_test.rs
  59. +6 −4 crates/cli/tests/list_remote_test.rs
  60. +6 −4 crates/cli/tests/list_test.rs
  61. +58 −58 crates/cli/tests/outdated_test.rs
  62. +98 −61 crates/cli/tests/pin_test.rs
  63. +72 −33 crates/cli/tests/plugin_add_test.rs
  64. +57 −21 crates/cli/tests/plugin_remove_test.rs
  65. +36 −28 crates/cli/tests/plugin_search_test.rs
  66. +204 −108 crates/cli/tests/plugins_test.rs
  67. +59 −46 crates/cli/tests/regen_test.rs
  68. +202 −191 crates/cli/tests/run_test.rs
  69. +79 −71 crates/cli/tests/shim_test.rs
  70. +6 −0 crates/cli/tests/snapshots/activate_test__activate__can_include_global_tools.snap
  71. +24 −0 crates/cli/tests/snapshots/activate_test__activate__empty_output_if_no_tools.snap
  72. +13 −0 crates/cli/tests/snapshots/activate_test__activate__passes_args_through.snap
  73. +32 −0 crates/cli/tests/snapshots/activate_test__activate__supports_json_exports.snap
  74. +9 −0 crates/cli/tests/snapshots/activate_test__activate__supports_many_tools.snap
  75. +19 −0 crates/cli/tests/snapshots/activate_test__activate__supports_one_tool.snap
  76. +3 −3 crates/cli/tests/snapshots/outdated_test__outdated__updates_each_file_respectively.snap
  77. +1 −5 crates/cli/tests/snapshots/plugins_test__plugins__builtins__supports_python.snap
  78. +51 −39 crates/cli/tests/status_test.rs
  79. +62 −23 crates/cli/tests/unalias_test.rs
  80. +61 −36 crates/cli/tests/uninstall_test.rs
  81. +51 −16 crates/cli/tests/unpin_test.rs
  82. +24 −0 crates/cli/tests/upgrade_test.rs
  83. +0 −68 crates/cli/tests/use_test.rs
  84. +71 −25 crates/cli/tests/utils.rs
  85. +4 −3 crates/codegen/Cargo.toml
  86. +25 −18 crates/core/Cargo.toml
  87. +39 −1 crates/core/src/error.rs
  88. +0 −46 crates/core/src/events.rs
  89. +484 −0 crates/core/src/flow/install.rs
  90. +175 −0 crates/core/src/flow/link.rs
  91. +437 −0 crates/core/src/flow/locate.rs
  92. +5 −0 crates/core/src/flow/mod.rs
  93. +259 −0 crates/core/src/flow/resolve.rs
  94. +175 −0 crates/core/src/flow/setup.rs
  95. +45 −44 crates/core/src/helpers.rs
  96. +107 −0 crates/core/src/layout/bin_manager.rs
  97. +4 −0 crates/core/src/layout/mod.rs
  98. +3 −3 crates/core/src/{ → layout}/shim_registry.rs
  99. +23 −5 crates/core/src/layout/store.rs
  100. +2 −3 crates/core/src/lib.rs
  101. +55 −19 crates/core/src/proto.rs
  102. +350 −75 crates/core/src/proto_config.rs
  103. +2 −0 crates/core/src/registry/data.rs
  104. +4 −4 crates/core/src/registry/registry.rs
  105. +73 −1,312 crates/core/src/tool.rs
  106. +84 −25 crates/core/src/tool_loader.rs
  107. +2 −2 crates/core/src/tool_manifest.rs
  108. +8 −5 crates/core/src/version_resolver.rs
  109. +163 −0 crates/core/tests/bin_manager_test.rs
  110. +447 −24 crates/core/tests/proto_config_test.rs
  111. +9 −6 crates/core/tests/version_detector_test.rs
  112. +2 −3 crates/installer/Cargo.toml
  113. +16 −0 crates/installer/src/error.rs
  114. +140 −85 crates/installer/src/lib.rs
  115. +29 −0 crates/installer/src/unix.rs
  116. +32 −0 crates/installer/src/windows.rs
  117. +6 −7 crates/pdk-api/Cargo.toml
  118. +51 −13 crates/pdk-api/src/api/mod.rs
  119. +6 −6 crates/pdk-test-utils/Cargo.toml
  120. +2 −2 crates/pdk-test-utils/src/config_builder.rs
  121. +1 −1 crates/pdk-test-utils/src/lib.rs
  122. +48 −43 crates/pdk-test-utils/src/macros.rs
  123. +20 −20 crates/pdk-test-utils/src/sandbox.rs
  124. +55 −18 crates/pdk-test-utils/src/wrapper.rs
  125. +3 −3 crates/pdk/Cargo.toml
  126. +1 −1 crates/shim/Cargo.toml
  127. +5 −5 crates/shim/src/lib.rs
  128. +1 −1 crates/system-env/Cargo.toml
  129. +1 −1 crates/system-env/src/deps.rs
  130. +14 −10 crates/system-env/src/helpers.rs
  131. +2 −1 crates/version-spec/Cargo.toml
  132. +2 −0 crates/version-spec/src/lib.rs
  133. +3 −2 crates/version-spec/src/resolved_spec.rs
  134. +7 −7 crates/version-spec/src/unresolved_parser.rs
  135. +7 −6 crates/version-spec/src/unresolved_spec.rs
  136. +5 −4 crates/version-spec/tests/resolved_spec_test.rs
  137. +32 −7 crates/version-spec/tests/unresolved_spec_test.rs
  138. +3 −3 crates/warpgate-api/Cargo.toml
  139. +56 −4 crates/warpgate-api/src/host_funcs.rs
  140. +2 −0 crates/warpgate-api/src/lib.rs
  141. +79 −70 crates/warpgate-api/src/locator.rs
  142. +20 −0 crates/warpgate-api/src/locator_error.rs
  143. +78 −33 crates/warpgate-api/tests/locator_test.rs
  144. +2 −2 crates/warpgate-pdk/Cargo.toml
  145. +13 −0 crates/warpgate-pdk/src/api.rs
  146. +74 −47 crates/warpgate-pdk/src/funcs.rs
  147. +2 −0 crates/warpgate-pdk/src/lib.rs
  148. +26 −2 crates/warpgate-pdk/src/macros.rs
  149. +15 −6 crates/warpgate/Cargo.toml
  150. +5 −4 crates/warpgate/README.md
  151. +203 −15 crates/warpgate/src/client.rs
  152. +32 −0 crates/warpgate/src/endpoints.rs
  153. +25 −11 crates/warpgate/src/error.rs
  154. +26 −8 crates/warpgate/src/helpers.rs
  155. +251 −30 crates/warpgate/src/{host_funcs.rs → host.rs}
  156. +19 −17 crates/warpgate/src/id.rs
  157. +4 −2 crates/warpgate/src/lib.rs
  158. +153 −125 crates/warpgate/src/loader.rs
  159. +51 −45 crates/warpgate/src/plugin.rs
  160. +3 −2 crates/warpgate/src/test_utils.rs
  161. +15 −20 crates/warpgate/tests/loader_test.rs
  162. +30 −0 dist-workspace.toml
  163. +4 −4 docs/debugging.md
  164. +41 −16 package/src/api-types.ts
  165. +936 −1,234 plugins/Cargo.lock
  166. +7 −3 plugins/wasm-test/src/lib.rs
  167. +18 −18 registry/data/built-in.json
  168. +339 −50 registry/data/third-party.json
  169. +3 −1 registry/schema.json
  170. +1 −1 rust-toolchain.toml
  171. +1 −1 version
9 changes: 1 addition & 8 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -6,14 +6,7 @@ body:
- type: markdown
attributes:
value: |
If you're reporting an issue for a specific language/tool and _not_ for proto itself, please report the issue on their official repository.
- [Bun](https://github.com/moonrepo/bun-plugin)
- [Deno](https://github.com/moonrepo/deno-plugin)
- [Go](https://github.com/moonrepo/go-plugin)
- [Node (npm, etc)](https://github.com/moonrepo/node-plugin)
- [Python](https://github.com/moonrepo/python-plugin)
- [Rust](https://github.com/moonrepo/rust-plugin)
- [TOML schema](https://github.com/moonrepo/schema-plugin)
If you're reporting an issue for a specific language/tool and _not_ for proto itself, please report the issue on the [official tools repository](https://github.com/moonrepo/tools).
- type: input
attributes:
label: What version?
12 changes: 9 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -8,6 +8,10 @@ on:
- master
pull_request:

env:
# For setup-rust
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
codegen:
name: Codegen
@@ -62,8 +66,9 @@ jobs:
- uses: moonrepo/setup-rust@v1
with:
bins: cargo-wasi, cargo-nextest, just
cache: ${{ runner.os != 'Linux' }}
cache-base: "^(master|develop-)"
cache: false
# cache: ${{ runner.os != 'Linux' }}
# cache-base: "^(master|develop-)"
- if: ${{ runner.os != 'Windows' }}
run: just build-wasm
env:
@@ -91,7 +96,8 @@ jobs:
- uses: moonrepo/setup-rust@v1
with:
bins: cargo-wasi, just
cache-base: "^(master|develop-)"
cache: false
# cache-base: "^(master|develop-)"
- run: just build
- run: just build-wasm
- run: cargo run -- --help
1 change: 1 addition & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -17,6 +17,7 @@ permissions:

jobs:
build:
if: (github.event_name == 'schedule' && github.repository == 'moonrepo/proto') || (github.event_name != 'schedule')
strategy:
fail-fast: false
matrix:
108 changes: 62 additions & 46 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
# This file was autogenerated by dist: https://opensource.axo.dev/cargo-dist/
#
# Copyright 2022-2024, axodotdev
# SPDX-License-Identifier: MIT or Apache-2.0
#
# CI that:
#
# * checks for a Git Tag that looks like a release
# * builds artifacts with cargo-dist (archives, installers, hashes)
# * builds artifacts with dist (archives, installers, hashes)
# * uploads those artifacts to temporary workflow zip
# * on success, uploads the artifacts to a GitHub Release
#
# Note that the GitHub Release will be created with a generated
# title/body based on your changelogs.

name: Release

permissions:
contents: write
"contents": "write"

# This task will run whenever you push a git tag that looks like a version
# like "1.0.0", "v0.1.0-prerelease.1", "my-app/0.1.0", "releases/v1.0.0", etc.
@@ -23,10 +24,10 @@ permissions:
# must be a Cargo-style SemVer Version (must have at least major.minor.patch).
#
# If PACKAGE_NAME is specified, then the announcement will be for that
# package (erroring out if it doesn't have the given version or isn't cargo-dist-able).
# package (erroring out if it doesn't have the given version or isn't dist-able).
#
# If PACKAGE_NAME isn't specified, then the announcement will be for all
# (cargo-dist-able) packages in the workspace with that version (this mode is
# (dist-able) packages in the workspace with that version (this mode is
# intended for workspaces with only one dist-able package, or with all dist-able
# packages versioned/released in lockstep).
#
@@ -38,15 +39,15 @@ permissions:
# If there's a prerelease-style suffix to the version, then the release(s)
# will be marked as a prerelease.
on:
pull_request:
push:
tags:
- "v[0-9]+*"
pull_request:

jobs:
# Run 'cargo dist plan' (or host) to determine what tasks we need to do
# Run 'dist plan' (or host) to determine what tasks we need to do
plan:
runs-on: ubuntu-latest
runs-on: "ubuntu-20.04"
outputs:
val: ${{ steps.plan.outputs.manifest }}
tag: ${{ !github.event.pull_request && github.ref_name || '' }}
@@ -58,20 +59,25 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install cargo-dist
- name: Install dist
# we specify bash to get pipefail; it guards against the `curl` command
# failing. otherwise `sh` won't catch that `curl` returned non-0
shell: bash
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.13.3/cargo-dist-installer.sh | sh"
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.24.1/cargo-dist-installer.sh | sh"
- name: Cache dist
uses: actions/upload-artifact@v4
with:
name: cargo-dist-cache
path: ~/.cargo/bin/dist
# sure would be cool if github gave us proper conditionals...
# so here's a doubly-nested ternary-via-truthiness to try to provide the best possible
# functionality based on whether this is a pull_request, and whether it's from a fork.
# (PRs run on the *source* but secrets are usually on the *target* -- that's *good*
# but also really annoying to build CI around when it needs secrets to work right.)
- id: plan
run: |
cargo dist ${{ (!github.event.pull_request && format('host --steps=create --tag={0}', github.ref_name)) || 'plan' }} --output-format=json > plan-dist-manifest.json
echo "cargo dist ran successfully"
dist ${{ (!github.event.pull_request && format('host --steps=create --tag={0}', github.ref_name)) || 'plan' }} --output-format=json > plan-dist-manifest.json
echo "dist ran successfully"
cat plan-dist-manifest.json
echo "manifest=$(jq -c "." plan-dist-manifest.json)" >> "$GITHUB_OUTPUT"
- name: "Upload dist-manifest.json"
@@ -89,12 +95,12 @@ jobs:
if: ${{ fromJson(needs.plan.outputs.val).ci.github.artifacts_matrix.include != null && (needs.plan.outputs.publishing == 'true' || fromJson(needs.plan.outputs.val).ci.github.pr_run_mode == 'upload') }}
strategy:
fail-fast: false
# Target platforms/runners are computed by cargo-dist in create-release.
# Target platforms/runners are computed by dist in create-release.
# Each member of the matrix has the following arguments:
#
# - runner: the github runner
# - dist-args: cli flags to pass to cargo dist
# - install-dist: expression to run to install cargo-dist on the runner
# - dist-args: cli flags to pass to dist
# - install-dist: expression to run to install dist on the runner
#
# Typically there will be:
# - 1 "global" task that builds universal installers
@@ -114,7 +120,8 @@ jobs:
- uses: swatinem/rust-cache@v2
with:
key: ${{ join(matrix.targets, '-') }}
- name: Install cargo-dist
cache-provider: ${{ matrix.cache_provider }}
- name: Install dist
run: ${{ matrix.install_dist }}
# Get the dist-manifest
- name: Fetch local artifacts
@@ -129,8 +136,8 @@ jobs:
- name: Build artifacts
run: |
# Actually do builds and make zips and whatnot
cargo dist build ${{ needs.plan.outputs.tag-flag }} --print=linkage --output-format=json ${{ matrix.dist_args }} > dist-manifest.json
echo "cargo dist ran successfully"
dist build ${{ needs.plan.outputs.tag-flag }} --print=linkage --output-format=json ${{ matrix.dist_args }} > dist-manifest.json
echo "dist ran successfully"
- id: cargo-dist
name: Post-build
# We force bash here just because github makes it really hard to get values up
@@ -165,9 +172,12 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install cargo-dist
shell: bash
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.13.3/cargo-dist-installer.sh | sh"
- name: Install cached dist
uses: actions/download-artifact@v4
with:
name: cargo-dist-cache
path: ~/.cargo/bin/
- run: chmod +x ~/.cargo/bin/dist
# Get all the local artifacts for the global tasks to use (for e.g. checksums)
- name: Fetch local artifacts
uses: actions/download-artifact@v4
@@ -178,8 +188,8 @@ jobs:
- id: cargo-dist
shell: bash
run: |
cargo dist build ${{ needs.plan.outputs.tag-flag }} --output-format=json "--artifacts=global" > dist-manifest.json
echo "cargo dist ran successfully"
dist build ${{ needs.plan.outputs.tag-flag }} --output-format=json "--artifacts=global" > dist-manifest.json
echo "dist ran successfully"
# Parse out what we just built and upload it to scratch storage
echo "paths<<EOF" >> "$GITHUB_OUTPUT"
@@ -211,20 +221,23 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install cargo-dist
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.13.3/cargo-dist-installer.sh | sh"
- name: Install cached dist
uses: actions/download-artifact@v4
with:
name: cargo-dist-cache
path: ~/.cargo/bin/
- run: chmod +x ~/.cargo/bin/dist
# Fetch artifacts from scratch-storage
- name: Fetch artifacts
uses: actions/download-artifact@v4
with:
pattern: artifacts-*
path: target/distrib/
merge-multiple: true
# This is a harmless no-op for GitHub Releases, hosting for that happens in "announce"
- id: host
shell: bash
run: |
cargo dist host ${{ needs.plan.outputs.tag-flag }} --steps=upload --steps=release --output-format=json > dist-manifest.json
dist host ${{ needs.plan.outputs.tag-flag }} --steps=upload --steps=release --output-format=json > dist-manifest.json
echo "artifacts uploaded and released successfully"
cat dist-manifest.json
echo "manifest=$(jq -c "." dist-manifest.json)" >> "$GITHUB_OUTPUT"
@@ -234,8 +247,29 @@ jobs:
# Overwrite the previous copy
name: artifacts-dist-manifest
path: dist-manifest.json
# Create a GitHub Release while uploading all files to it
- name: "Download GitHub Artifacts"
uses: actions/download-artifact@v4
with:
pattern: artifacts-*
path: artifacts
merge-multiple: true
- name: Cleanup
run: |
# Remove the granular manifests
rm -f artifacts/*-dist-manifest.json
- name: Create GitHub Release
env:
PRERELEASE_FLAG: "${{ fromJson(steps.host.outputs.manifest).announcement_is_prerelease && '--prerelease' || '' }}"
ANNOUNCEMENT_TITLE: "${{ fromJson(steps.host.outputs.manifest).announcement_title }}"
ANNOUNCEMENT_BODY: "${{ fromJson(steps.host.outputs.manifest).announcement_github_body }}"
RELEASE_COMMIT: "${{ github.sha }}"
run: |
# Write and read notes from a file to avoid quoting breaking things
echo "$ANNOUNCEMENT_BODY" > $RUNNER_TEMP/notes.txt
gh release create "${{ needs.plan.outputs.tag }}" --target "$RELEASE_COMMIT" $PRERELEASE_FLAG --title "$ANNOUNCEMENT_TITLE" --notes-file "$RUNNER_TEMP/notes.txt" artifacts/*
# Create a GitHub Release while uploading all files to it
announce:
needs:
- plan
@@ -251,21 +285,3 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: "Download GitHub Artifacts"
uses: actions/download-artifact@v4
with:
pattern: artifacts-*
path: artifacts
merge-multiple: true
- name: Cleanup
run: |
# Remove the granular manifests
rm -f artifacts/*-dist-manifest.json
- name: Create GitHub Release
uses: ncipollo/release-action@v1
with:
tag: ${{ needs.plan.outputs.tag }}
name: ${{ fromJson(needs.host.outputs.val).announcement_title }}
body: ${{ fromJson(needs.host.outputs.val).announcement_github_body }}
prerelease: ${{ fromJson(needs.host.outputs.val).announcement_is_prerelease }}
artifacts: "artifacts/*"
1 change: 1 addition & 0 deletions .prototools
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[plugins]
# moon-test = "file://./crates/cli/tests/fixtures/moon-schema.yaml"
moon-test = "https://raw.githubusercontent.com/moonrepo/moon/master/proto-plugin.toml"
wasm-test = "file://./plugins/target/wasm32-wasi/debug/proto_wasm_test.wasm"

Loading