{"id":15713496,"url":"https://github.com/crystal-lang/install-crystal","last_synced_at":"2025-04-04T18:05:52.886Z","repository":{"id":40997489,"uuid":"261006136","full_name":"crystal-lang/install-crystal","owner":"crystal-lang","description":"GitHub Action: Install Crystal programming language","archived":false,"fork":false,"pushed_at":"2025-03-13T08:55:08.000Z","size":9991,"stargazers_count":69,"open_issues_count":6,"forks_count":8,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-03-28T17:06:36.018Z","etag":null,"topics":["crystal","github-actions","shards"],"latest_commit_sha":null,"homepage":"https://crystal-lang.github.io/install-crystal/configurator.html","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/crystal-lang.png","metadata":{"funding":{"open_collective":"crystal-lang"},"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","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}},"created_at":"2020-05-03T19:34:02.000Z","updated_at":"2025-03-13T08:54:50.000Z","dependencies_parsed_at":"2024-01-23T21:20:30.744Z","dependency_job_id":"92315f9b-00f7-4fa7-a42a-c80067d725f2","html_url":"https://github.com/crystal-lang/install-crystal","commit_stats":{"total_commits":110,"total_committers":5,"mean_commits":22.0,"dds":"0.11818181818181817","last_synced_commit":"ff23c54d7e7588575ab36856277d3bfb408de736"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crystal-lang%2Finstall-crystal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crystal-lang%2Finstall-crystal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crystal-lang%2Finstall-crystal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crystal-lang%2Finstall-crystal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crystal-lang","download_url":"https://codeload.github.com/crystal-lang/install-crystal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247226213,"owners_count":20904465,"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":["crystal","github-actions","shards"],"created_at":"2024-10-03T21:31:48.486Z","updated_at":"2025-04-04T18:05:52.856Z","avatar_url":"https://github.com/crystal-lang.png","language":"JavaScript","funding_links":["https://opencollective.com/crystal-lang"],"categories":[],"sub_categories":[],"readme":"install-crystal\n===============\n\n[GitHub Action][] to **install [Crystal][] programming language** and [Shards][] package manager.\n\nWorks on Ubuntu, macOS, Windows.\n\n### Quickstart\n\n**[Configurator][]**: get a pre-made config for your exact use case!\n\n## Examples\n\n```yaml\nsteps:\n  - uses: crystal-lang/install-crystal@v1\n  - run: crystal eval \"puts 1337\"\n```\n\n```yaml\nsteps:\n  - uses: actions/checkout@v4\n  - uses: crystal-lang/install-crystal@v1\n    with:\n      crystal: 1.11\n  - run: shards install\n  - run: crystal spec\n```\n\n```yaml\n    strategy:\n      fail-fast: false\n      matrix:\n        include:\n          - {os: ubuntu-latest, crystal: latest}\n          - {os: ubuntu-latest, crystal: nightly}\n          - {os: macos-latest}\n          - {os: windows-latest}\n    runs-on: ${{matrix.os}}\n    steps:\n      - uses: crystal-lang/install-crystal@v1\n        with:\n          crystal: ${{matrix.crystal}}\n      - uses: actions/checkout@v4\n      - run: shards install\n      - run: crystal spec\n      - run: crystal tool format \u0026\u0026 git diff --exit-code\n        if: matrix.crystal == 'latest'\n```\n\n[Find usages in the wild!](https://github.com/search?l=YAML\u0026q=%22oprypin%2Finstall-crystal%22\u0026type=Code)\n\nAlternatively, you can use the container-based approach [as in the starter workflow][crystal-starter] (without this action), but the advantage here is the unified approach to installation across 3 systems. [Using a custom container has disadvantages on its own, too](https://forum.crystal-lang.org/t//2837).\n\n## Usage\n\n### Inputs\n\n *   *  **`crystal: 1.1.0`**, **`crystal: 1.2`**\n\n        Install a particular release of Crystal (if the full version is specified), or the latest patch version of a release series.\n\n     *  **`crystal: latest`** (default)\n\n        Install the latest released version of Crystal.\n\n     *  **`crystal: nightly`**\n\n        Install Crystal from the latest continuous build on [crystal.git][] master.\n\n     *  **`crystal: \"branch:foo/bar\"`**\n\n        Install Crystal from the latest maintenance build on [crystal.git][] branch specified after `branch:`.\n\n *   *  **`shards: true`** (default)\n\n        Ensure that *some* released version of [Shards][] is available.\n        This uses the build that's bundled with Crystal's releases. Other options are slower, as building Shards is a necessary step then.\n\n     *  **`shards: false`**\n\n        Ensure that `shards` executable is *not* available.\n\n     *  **`shards: latest`**\n\n        Build and install the latest released version of Shards.\n\n     *  **`shards: 0.14.0`**, **`shards: 0.16`**\n\n        Build and install a particular release of Shards (if the full version is specified), or the latest patch version of a release series.\n\n     *  **`shards: nightly`**\n\n        Build and install the latest commit of [shards.git][] master.\n\n *  **`arch: x86_64`**, **`arch: x86`** (defaults to current OS arch)\n\n    The architecture of the build of Crystal to download.\n\n *  **`destination: some/path`**\n\n    The directory to store Crystal in, after extracting. Will directly affect `outputs.path` (the default is in a temporary location).\n\n *  **`annotate: true`** (default)\n\n    Display compilation and spec errors as GitHub code annotations.\n\n *  **`token: ${{ github.token }}`**\n\n    Personal access token (auto-populated).\n\n### Outputs\n\n *  **`crystal`** (`${{ steps.some_step_id.outputs.crystal }}`)\n\n    The actual version of Crystal (as a ref in crystal-lang/[crystal.git][]) that was installed.\n\n *  **`shards`** (`${{ steps.some_step_id.outputs.shards }}`)\n\n    The actual version of Shards (as a ref in crystal-lang/[shards.git][]) that was installed.\n\n *  **`path`** (`${{ steps.some_step_id.outputs.path }}`)\n\n    The path where Crystal was extracted to, so you can use '[path]/bin/crystal', '[path]/src' etc.\n\n[github action]: https://github.com/features/actions\n[crystal]: https://crystal-lang.org/\n[crystal.git]: https://github.com/crystal-lang/crystal\n[shards]: https://github.com/crystal-lang/shards\n[shards.git]: https://github.com/crystal-lang/shards\n[crystal-starter]: https://github.com/actions/starter-workflows/blob/master/ci/crystal.yml\n[configurator]: https://crystal-lang.github.io/install-crystal/configurator.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrystal-lang%2Finstall-crystal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrystal-lang%2Finstall-crystal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrystal-lang%2Finstall-crystal/lists"}