@@ -1457,50 +1457,34 @@ const tc = __importStar(__webpack_require__(533));
1457
1457
function run ( ) {
1458
1458
return __awaiter ( this , void 0 , void 0 , function * ( ) {
1459
1459
try {
1460
- const toolDir = tc . find ( 'equinox' , '1.14.0' , 'x64' ) ;
1460
+ const version = core . getInput ( 'sqlc-version' ) || '1.9.0' ;
1461
+ const toolDir = tc . find ( 'sqlc' , version , 'x64' ) ;
1461
1462
if ( toolDir !== '' ) {
1462
1463
core . addPath ( toolDir ) ;
1463
1464
return ;
1464
1465
}
1465
- const channel = core . getInput ( 'channel' ) ;
1466
- if ( ! [ 'stable' , 'beta' , '' ] . includes ( channel ) ) {
1467
- core . setFailed ( `Unknown release channel ${ channel } ` ) ;
1468
- return ;
1469
- }
1470
1466
switch ( process . platform ) {
1471
1467
case 'win32' : {
1472
- let toolUrl = 'https://bin.equinox.io/a/3tDrUv1NjAT/release-tool-1.14.0-windows-amd64.zip' ;
1473
- if ( channel === 'beta' ) {
1474
- toolUrl =
1475
- 'https://bin.equinox.io/a/ihPCmxfgCRn/release-tool-1.11.0-windows-amd64.zip' ;
1476
- }
1468
+ const toolUrl = `https://downloads.sqlc.dev/sqlc_${ version } _windows_amd64.zip` ;
1477
1469
const downloadPath = yield tc . downloadTool ( toolUrl ) ;
1478
1470
const extPath = yield tc . extractZip ( downloadPath ) ;
1479
- const cachedPath = yield tc . cacheDir ( extPath , 'equinox ' , '1.14.0' ) ;
1471
+ const cachedPath = yield tc . cacheDir ( extPath , 'sqlc ' , version ) ;
1480
1472
core . addPath ( cachedPath ) ;
1481
1473
break ;
1482
1474
}
1483
1475
case 'darwin' : {
1484
- let toolUrl = 'https://bin.equinox.io/a/dsR9Yc3Uxrc/release-tool-1.14.0-darwin-amd64.zip' ;
1485
- if ( channel === 'beta' ) {
1486
- toolUrl =
1487
- 'https://bin.equinox.io/a/mQkEFPVp73u/release-tool-1.11.0-darwin-amd64.zip' ;
1488
- }
1476
+ const toolUrl = `https://downloads.sqlc.dev/sqlc_${ version } _darwin_amd64.zip` ;
1489
1477
const downloadPath = yield tc . downloadTool ( toolUrl ) ;
1490
1478
const extPath = yield tc . extractZip ( downloadPath ) ;
1491
- const cachedPath = yield tc . cacheDir ( extPath , 'equinox ' , '1.14.0' ) ;
1479
+ const cachedPath = yield tc . cacheDir ( extPath , 'sqlc ' , version ) ;
1492
1480
core . addPath ( cachedPath ) ;
1493
1481
break ;
1494
1482
}
1495
1483
case 'linux' : {
1496
- let toolUrl = 'https://bin.equinox.io/a/hFqBgoEANbs/release-tool-1.14.0-linux-amd64.tar.gz' ;
1497
- if ( channel === 'beta' ) {
1498
- toolUrl =
1499
- 'https://bin.equinox.io/a/2F6Hftj7dsf/release-tool-1.11.0-linux-amd64.tar.gz' ;
1500
- }
1484
+ const toolUrl = `https://downloads.sqlc.dev/sqlc_${ version } _linux_amd64.zip` ;
1501
1485
const downloadPath = yield tc . downloadTool ( toolUrl ) ;
1502
1486
const extPath = yield tc . extractTar ( downloadPath ) ;
1503
- const cachedPath = yield tc . cacheDir ( extPath , 'equinox ' , '1.14.0' ) ;
1487
+ const cachedPath = yield tc . cacheDir ( extPath , 'sqlc ' , version ) ;
1504
1488
core . addPath ( cachedPath ) ;
1505
1489
break ;
1506
1490
}
0 commit comments