mirror of
https://github.com/shivammathur/setup-php.git
synced 2025-08-22 05:24:08 +07:00
Bump version to 2.30.0
This commit is contained in:
@ -22,11 +22,9 @@ interface IRef {
|
||||
export async function getSemverVersion(data: RS): Promise<string> {
|
||||
const search: string = data['version_prefix'] + data['version'];
|
||||
const url = `https://api.github.com/repos/${data['repository']}/git/matching-refs/tags%2F${search}.`;
|
||||
let github_token: string = await utils.readEnv('GITHUB_TOKEN');
|
||||
const composer_token: string = await utils.readEnv('COMPOSER_TOKEN');
|
||||
if (composer_token && !github_token) {
|
||||
github_token = composer_token;
|
||||
}
|
||||
const github_token: string =
|
||||
(await utils.readEnv('GITHUB_TOKEN')) ||
|
||||
(await utils.readEnv('COMPOSER_TOKEN'));
|
||||
const response: RS = await fetch.fetch(url, github_token);
|
||||
if (response.error || response.data === '[]') {
|
||||
data['error'] = response.error ?? `No version found with prefix ${search}.`;
|
||||
|
Reference in New Issue
Block a user