@@ -1457,50 +1457,34 @@ const tc = __importStar(__webpack_require__(533));
14571457function run ( ) {
14581458 return __awaiter ( this , void 0 , void 0 , function * ( ) {
14591459 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' ) ;
14611462 if ( toolDir !== '' ) {
14621463 core . addPath ( toolDir ) ;
14631464 return ;
14641465 }
1465- const channel = core . getInput ( 'channel' ) ;
1466- if ( ! [ 'stable' , 'beta' , '' ] . includes ( channel ) ) {
1467- core . setFailed ( `Unknown release channel ${ channel } ` ) ;
1468- return ;
1469- }
14701466 switch ( process . platform ) {
14711467 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` ;
14771469 const downloadPath = yield tc . downloadTool ( toolUrl ) ;
14781470 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 ) ;
14801472 core . addPath ( cachedPath ) ;
14811473 break ;
14821474 }
14831475 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` ;
14891477 const downloadPath = yield tc . downloadTool ( toolUrl ) ;
14901478 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 ) ;
14921480 core . addPath ( cachedPath ) ;
14931481 break ;
14941482 }
14951483 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` ;
15011485 const downloadPath = yield tc . downloadTool ( toolUrl ) ;
15021486 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 ) ;
15041488 core . addPath ( cachedPath ) ;
15051489 break ;
15061490 }
0 commit comments