MCPcopy Index your code
hub / github.com/QwikDev/qwik / createGithubRelease

Function createGithubRelease

scripts/release.ts:233–255  ·  view source on GitHub ↗
(version: string, gitTag: string, isDryRun: boolean)

Source from the content-addressed store, hash-verified

231}
232
233async function createGithubRelease(version: string, gitTag: string, isDryRun: boolean) {
234 const [owner, repo] = process.env.GITHUB_REPOSITORY!.split('/');
235 const isPrerelease = !!semver.prerelease(version);
236
237 const ghUrl = 'POST /repos/{owner}/{repo}/releases';
238 const ghData = {
239 owner,
240 repo,
241 tag_name: gitTag,
242 prerelease: isPrerelease,
243 generate_release_notes: true,
244 };
245 console.log(` ${ghUrl} ${JSON.stringify(ghData)}`, isDryRun ? '(dry-run)' : '');
246
247 if (!isDryRun) {
248 // https://docs.github.com/en/rest/reference/repos#create-a-release
249 const octokit = new Octokit();
250 await octokit.request(ghUrl, ghData);
251 console.log(
252 `🐋 created github release "${gitTag}": https://github.com/${owner}/${repo}/releases`
253 );
254 }
255}
256
257export async function checkExistingNpmVersion(pkgName: string, newVersion: string) {
258 if (newVersion !== '0.0.1') {

Callers 1

publishFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…