Skip to content

Commit c00010d

Browse files
committed
Return a static download URL
1 parent 0882539 commit c00010d

File tree

4 files changed

+26
-4
lines changed

4 files changed

+26
-4
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ jobs:
1212
- name: Setup gh
1313
uses: ./
1414
with:
15-
version: 1.2.0
15+
version: 1.1.0
1616
- run: gh --version

dist/index.js

Lines changed: 13 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/utils.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
1+
const os = require('os');
2+
3+
const core = require('@actions/core');
4+
15
function getDownloadURL(version) {
6+
core.debug(`platform: ${ os.platform() }`);
7+
core.debug(`arch: ${ os.arch() }`);
8+
core.debug(version);
29

10+
// https://github.com/cli/cli/releases/download/v1.1.0/gh_1.1.0_linux_amd64.tar.gz
11+
// https://github.com/cli/cli/releases/download/v1.1.0/gh_1.1.0_macOS_amd64.tar.gz
12+
// https://github.com/cli/cli/releases/download/v1.1.0/gh_1.1.0_windows_amd64.zip
13+
return `https://github.com/cli/cli/releases/download/v${ version }/gh_${ version }_linux_amd64.tar.gz`
314
}
415

516
module.exports = { getDownloadURL }

0 commit comments

Comments
 (0)