GitHub Action to publish artifacts as package versions to Private Packagist.
PHP >= 7.2
Via Composer:
$ composer require private-packagist/oidc-identitiesInitiate a TokenGenerator instance and call the generate method with $audience.
The TokenGenerator will automatically try all supported platforms.
// Configure a HttpMethodsClient instance
$oidcHttpClient = new HttpMethodsClient(
Psr18ClientDiscovery::find(),
Psr17FactoryDiscovery::findRequestFactory(),
Psr17FactoryDiscovery::findStreamFactory(),
);
$tokenGenerator = new TokenGenerator(new NullLogger(), $oidcHttpClient);
$token = $tokenGenerator->generate($audience);The GitHub Action is licensed under the MIT License.