Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,18 +143,25 @@ jobs:
cabal: "3.10.2.0"
cabal_update: "false"

# Test ghcup pre-release channel
# Test ghcup pre-release channel with symbolic name (issue #152)
- os: ubuntu-latest
ghcup_release_channel: "https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.9.yaml"
ghcup_release_channel: "prereleases"
plan:
ghc: "9.12.1.20250219"
# 2025-07-29: just not out yet: "9.10.2.20250725"
ghc: "10.0.0.20260917"
cabal: "latest"

# Test ghcup pre-release channel with URL
- os: ubuntu-latest
ghcup_release_channel: "https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.1.0.yaml"
plan:
ghc: "9.14.1.20260916"
cabal: "latest"

# Test ghc nightly
- os: ubuntu-latest
ghcup_release_channel: "https://ghc.gitlab.haskell.org/ghcup-metadata/ghcup-nightlies-0.0.7.yaml"
# 2025-07-29: 0.0.8 and 0.0.9 do not exist
# 2026-09-22: neither 0.1.0
plan:
ghc: "latest-nightly"
cabal: "latest"
Expand Down
4 changes: 2 additions & 2 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/opts.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/opts.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/setup-haskell.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions src/opts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export interface ProgramOpt {

export interface Options {
ghc: ProgramOpt;
ghcup: {releaseChannel?: URL};
ghcup: {releaseChannel?: string};
cabal: ProgramOpt & {update: boolean};
stack: ProgramOpt & {setup: boolean};
general: {matcher: {enable: boolean}};
Expand Down Expand Up @@ -170,10 +170,7 @@ export function getOpts(
'disable-matcher',
inputs['disable-matcher'] || 'false'
);
const ghcupReleaseChannel = parseURL(
'ghcup-release-channel',
inputs['ghcup-release-channel'] || ''
);
const ghcupReleaseChannel = inputs['ghcup-release-channel'];
// Andreas, 2023-01-05, issue #29:
// 'cabal-update' has a default value, so we should get a proper boolean always.
// Andreas, 2023-01-06: This is not true if we use the action as a library.
Expand Down
6 changes: 1 addition & 5 deletions src/setup-haskell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,7 @@ export default async function run(
// await addGhcupReleaseChannel('vanilla', os, arch);
await addGhcupReleaseChannel('prereleases', os, arch);
if (opts.ghcup.releaseChannel)
await addGhcupReleaseChannel(
opts.ghcup.releaseChannel.toString(),
os,
arch
);
await addGhcupReleaseChannel(opts.ghcup.releaseChannel, os, arch);
});

for (const [t, {resolved}] of Object.entries(opts).filter(
Expand Down
Loading