purescript-contrib / purescript-contrib/setup-purescript

Add a way to override the default version of a tool

Open
#16 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted
Dominant language
JavaScript
Stars
46
Forks
8
PR merge metrics
No merged PRs in 30d

Description

This idea came to me while reading through https://github.com/purescript/purescript/issues/3942, specifically the part about updating CI to use the v0.14.0-rc2 tag:

  • Update .travis.yml to grab the most recent RC (see eg purescript/purescript-prelude@268870d)

Thinking about how this would map onto GitHub Actions, the obvious thing to do would be to go through all of the purescript-contrib libraries and update their ci.yml files to point to a specific tag:

steps:
  - uses: actions/checkout@v2
  - uses: purescript-contrib/setup-purescript@main
    with:
      purescript: "0.14.0-rc2"
  - run: spago build

However, doing it this way seems like it would cause headaches if we get into the situation where a future release candidate is needed, as we would then have to go through all the libraries again to update the tag.

As an alternative solution, I'd like to propose creating a new branch (purescript-0.14, for example) for the PureScript v0.14.0 release. On this branch we'd reference whatever the latest v0.14.0 tag is as the default instead of latest.

We can then update all of the purescript-contrib libraries to point to our separate branch:

steps:
  - uses: actions/checkout@v2
  - uses: purescript-contrib/setup-purescript@purescript-0.14
  - run: spago build

This way if we did end up having to go through multiple release candidates we could just bump the version of PureScript referenced on the purescript-0.14 branch and all of the projects referencing that branch would then pull the correct version.

In order to accomplish this it seems like we would need to add a way to override the default version of a tool that should be used if one is not provided by the consumer of the Action.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the action's version-selection behavior and compare it with the .travis.yml and ci.yml examples described in the issue. The change is complete when a consumer-provided tool version takes precedence, while a branch such as purescript-0.14 can define the default used by workflows that omit one.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, javascript
Domain
ci-cd
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.