Skip to content

Commit

Permalink
Release v1.2.2 at 5dc4fd3
Browse files Browse the repository at this point in the history
  • Loading branch information
ueokande committed Apr 22, 2023
1 parent 29abc1a commit f0ff752
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 33 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ steps:
id: setup-chrome
- run: |
echo Installed chromium version: ${{ steps.setup-chrome.outputs.chrome-version }}
chrome --version
${{ steps.setup-chrome.outputs.chrome-path }} --version
```
**Note that the installed binary depends on your installation spec.**
Expand Down
38 changes: 6 additions & 32 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10338,7 +10338,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.MacOSChannelInstaller = void 0;
const platform_1 = __nccwpck_require__(2999);
const channel_1 = __nccwpck_require__(6542);
const tc = __importStar(__nccwpck_require__(7784));
const exec = __importStar(__nccwpck_require__(1514));
Expand All @@ -10361,44 +10360,19 @@ class MacOSChannelInstaller {
});
}
download(version) {
if (!(0, channel_1.isChannelName)(version)) {
throw new Error(`Unexpected version: ${version}`);
}
switch (this.platform.arch) {
case platform_1.Arch.AMD64:
return this.downloadForIntelChip(version);
case platform_1.Arch.ARM64:
return this.downloadForAppleChip(version);
default:
throw new Error(`Chromium ${version} not supported for platform ${this.platform.os} ${this.platform.arch}`);
}
}
downloadForIntelChip(channel) {
return __awaiter(this, void 0, void 0, function* () {
const url = (() => {
switch (channel) {
case "stable":
return `https://dl.google.com/chrome/mac/stable/GGRO/googlechrome.dmg`;
default:
return `https://dl.google.com/chrome/mac/${channel}/googlechrome${channel}.dmg`;
}
})();
core.info(`Acquiring ${channel} from ${url}`);
const archive = yield tc.downloadTool(url);
return { archive };
});
}
downloadForAppleChip(channel) {
return __awaiter(this, void 0, void 0, function* () {
if (!(0, channel_1.isChannelName)(version)) {
throw new Error(`Unexpected version: ${version}`);
}
const url = (() => {
switch (channel) {
switch (version) {
case "stable":
return `https://dl.google.com/chrome/mac/universal/stable/GGRO/googlechrome.dmg`;
default:
return `https://dl.google.com/chrome/mac/universal/${channel}/googlechrome${channel}.dmg`;
return `https://dl.google.com/chrome/mac/universal/${version}/googlechrome${version}.dmg`;
}
})();
core.info(`Acquiring ${channel} from ${url}`);
core.info(`Acquiring ${version} from ${url}`);
const archive = yield tc.downloadTool(url);
return { archive };
});
Expand Down

0 comments on commit f0ff752

Please sign in to comment.