Skip to content

Overhaul metadata merging and add 'ghcup config add-release-channel URI'

Julian Ospald requested to merge issue-328 into master

Wrt #328 (closed) @abel

This PR does two things:

  1. makes merging release channels more robust (previously we would only merge versions if the tool exists in the main channel)
  2. adds cli support, so to get pre-releases you would do: ghcup config add-release-channel

This might make adding pre-releases easier as described in #328 (comment 414294)

So a github workflow would look as follows:

    runs-on: ${{ matrix.os }}
      fail-fast: false
        os: [ubuntu-latest, macOS-latest, windows-latest]
        ghc: ['8.10.7', '']
        cabal: ['']

    - uses: actions/checkout@v2

    - name: enable pre-releases
      run: ghcup config add-release-channel
      shell: bash

    - uses: haskell/actions/setup@v1.2
        ghc-version: ${{ matrix.ghc }}
        cabal-version: ${{ matrix.cabal }}

Obviously, this will only work for windows if is merged. But since ghcup is pre-installed on ALL github environments, you can simply drop haskell/actions/setup@v1.2 and do this instead:

    - name: Install ghc/cabal
      run: |
        ghcup install ghc --set ${{ matrix.ghc }}
        ghcup install cabal ${{ matrix.cabal }}
Edited by Julian Ospald

Merge request reports