{"id":26076816,"url":"https://github.com/purescript-contrib/setup-purescript","last_synced_at":"2025-04-06T16:10:58.946Z","repository":{"id":38382434,"uuid":"284349557","full_name":"purescript-contrib/setup-purescript","owner":"purescript-contrib","description":"Set up a specific PureScript toolchain in your GitHub Actions workflow","archived":false,"fork":false,"pushed_at":"2025-03-30T13:01:42.000Z","size":804,"stargazers_count":45,"open_issues_count":10,"forks_count":8,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-30T14:19:49.148Z","etag":null,"topics":["github-actions","purescript"],"latest_commit_sha":null,"homepage":"","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/purescript-contrib.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-08-01T22:32:08.000Z","updated_at":"2025-03-30T13:01:42.000Z","dependencies_parsed_at":"2023-02-08T17:15:14.504Z","dependency_job_id":"7ad9d97b-a01f-424a-9551-de493ae0b877","html_url":"https://github.com/purescript-contrib/setup-purescript","commit_stats":{"total_commits":171,"total_committers":10,"mean_commits":17.1,"dds":0.3391812865497076,"last_synced_commit":"2261adeb43816954e81eb4273b0457735b4c0fee"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purescript-contrib%2Fsetup-purescript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purescript-contrib%2Fsetup-purescript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purescript-contrib%2Fsetup-purescript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purescript-contrib%2Fsetup-purescript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/purescript-contrib","download_url":"https://codeload.github.com/purescript-contrib/setup-purescript/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247509221,"owners_count":20950232,"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":["github-actions","purescript"],"created_at":"2025-03-09T02:35:51.919Z","updated_at":"2025-04-06T16:10:58.926Z","avatar_url":"https://github.com/purescript-contrib.png","language":"JavaScript","readme":"# Setup PureScript Action\n\n[![Integration](https://github.com/thomashoneyman/setup-purescript/workflows/Integration/badge.svg?branch=main)](https://github.com/thomashoneyman/setup-purescript/actions?query=workflow%3AIntegration+branch%3Amain)\n[![Sync Versions](https://github.com/thomashoneyman/setup-purescript/workflows/Sync%20Versions/badge.svg?branch=main)](https://github.com/thomashoneyman/setup-purescript/actions?query=workflow%3A\"Sync+Versions\"+branch%3Amain)\n\nA GitHub Action which sets up a PureScript toolchain for CI. Contains the following tools by default:\n\n- The [PureScript compiler](https://github.com/purescript/purescript)\n- The [Spago package manager and build tool](https://github.com/purescript/spago)\n  - Use the `unstable` version for spago-next; otherwise, setup-purescript provides [`spago-legacy`](https://github.com/purescript/spago-legacy); see [issue 37](https://github.com/purescript-contrib/setup-purescript/issues/37)\n- The [`psa` error reporting frontend for the compiler](https://github.com/natefaubion/purescript-psa)\n\nYou can also optionally include the following tools:\n\n- The [`purs-tidy` code formatter](https://github.com/natefaubion/purescript-tidy)\n- The [Zephyr dead code elimination tool](https://github.com/coot/zephyr)\n\nThis action is designed to support PureScript tools. Your PureScript project may also depend on tooling and libraries provided by the NPM ecosystem, in which case you will also want to use the [setup-node](https://github.com/actions/setup-node) action.\n\n## Usage\n\nSee the [action.yml](action.yml) file for all possible inputs and outputs.\n\n### Basic\n\nUse the PureScript toolchain with the latest versions of PureScript and Spago:\n\n```yaml\nsteps:\n  - uses: actions/checkout@v2\n  - uses: purescript-contrib/setup-purescript@main\n  - run: spago build\n```\n\nOther tools are not enabled by default, but you can enable them by specifying their version.\n\n### Specify Versions\n\nEach tool can accept one of the following:\n- a semantic version (only exact versions currently supported)\n- the string `\"latest\"`, which represents the latest version that uses major, minor, and patch, but will omit versions using pre-release identifiers or build metadata\n- the string `\"unstable\"`, which represents the latest version no matter what it is (i.e. pre-release identifiers and build metadata are not considered).\n\nTools that are not installed by default must be specified this way to be included in the toolchain.\n\n```yaml\nsteps:\n  - uses: actions/checkout@v2\n  - uses: purescript-contrib/setup-purescript@main\n    with:\n      purescript: \"0.14.0\"\n      psa: \"0.8.2\"\n      spago: \"latest\"\n      purs-tidy: \"latest\"\n      zephyr: \"0.3.2\"\n  - run: spago build\n```\n\n## Full Example Workflow\n\nThis workflow is a useful starting point for new projects and libraries. You can add a `.yml` file with the contents below to the `.github/workflows` directory in your project (for example: `.github/workflows/ci.yml`).\n\n```yml\nname: CI\n\non: push\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n\n      - uses: purescript-contrib/setup-purescript@main\n\n      - name: Cache PureScript dependencies\n        uses: actions/cache@v2\n        # This cache uses the .dhall files to know when it should reinstall\n        # and rebuild packages. It caches both the installed packages from\n        # the `.spago` directory and compilation artifacts from the `output`\n        # directory. When restored the compiler will rebuild any files that\n        # have changed. If you do not want to cache compiled output, remove\n        # the `output` path.\n        with:\n          key: ${{ runner.os }}-spago-${{ hashFiles('**/*.dhall') }}\n          path: |\n            .spago\n            output\n\n      - run: spago build\n\n      - run: spago test --no-install\n```\n\n## Development\n\nEnter a development shell with necessary tools installed:\n\n```sh\nnix-shell\n```\n\nIf you need any additional tools not included in this Nix expression or available via NPM, please feel free to add them via [easy-purescript-nix](https://github.com/justinwoo/easy-purescript-nix).\n\nNext, install NPM dependencies:\n\n```sh\nnpm install\n```\n\nGitHub Actions uses the `action.yml` file to define the action and the `dist/index.js` file to execute it. After making any changes to the source code, make sure those changes are visible by running:\n\n```sh\nnpm run build\n```\n\nThis will bundle and minify the source code so it is available to the end user.\n\n## Used By\n\nThese libraries and applications are examples of `setup-purescript` in action:\n\n- [halogen](https://github.com/purescript-halogen/purescript-halogen/blob/master/.github/workflows/ci.yml)\n- [halogen-realworld](https://github.com/thomashoneyman/purescript-halogen-realworld/blob/main/.github/workflows/ci.yml)\n- [halogen-formless](https://github.com/thomashoneyman/purescript-halogen-formless/blob/main/.github/workflows/ci.yml)\n- [halogen-hooks](https://github.com/thomashoneyman/purescript-halogen-hooks/blob/main/.github/workflows/ci.yml)\n- [slug](https://github.com/thomashoneyman/purescript-slug/blob/main/.github/workflows/ci.yml)\n- ...add your package here!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpurescript-contrib%2Fsetup-purescript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpurescript-contrib%2Fsetup-purescript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpurescript-contrib%2Fsetup-purescript/lists"}