Skip to content

Commit

Permalink
TESTING PUBLISH
Browse files Browse the repository at this point in the history
  • Loading branch information
Exidex committed Jan 27, 2024
1 parent 363cd33 commit 74ed792
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions js/release/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ await program.parseAsync(process.argv);


async function doRelease() {
const projectRoot = process.cwd();
const projectRoot = path.resolve(process.cwd(), '..', '..');
const git = simpleGit(projectRoot);

const versionFilePath = path.join(projectRoot, "VERSION");
Expand Down Expand Up @@ -98,28 +98,28 @@ async function doRelease() {
execSync('npm publish', { stdio: "inherit", cwd: denoProjectPath })
execSync('npm publish', { stdio: "inherit", cwd: apiProjectPath })

const executableFilePath = path.join(projectRoot, 'target', 'release', 'gauntlet');
const executableFileStats = await stat(executableFilePath);
const executableFileSize = executableFileStats.size;

const rustVv = execSync('rustc -Vv', { encoding: "utf-8" });
const archTarget = rustVv.match(/^host: (.+)$/)!![0]

const octokit = new Octokit({
auth: process.env.GITHUB_TOKEN
})

const repo = { owner: 'project-gauntlet', repo: 'gauntlet' };

const response = await octokit.request('POST /repos/{owner}/{repo}/releases', {
...repo,
tag_name: `v${version}`,
target_commitish: 'main',
name: `v${version}`,
body: notesForCurrentRelease.join('\n'),
});

// TODO:
// const executableFilePath = path.join(projectRoot, 'target', 'release', 'gauntlet');
// const executableFileStats = await stat(executableFilePath);
// const executableFileSize = executableFileStats.size;
//
// const rustVv = execSync('rustc -Vv', { encoding: "utf-8" });
// const archTarget = rustVv.match(/^host: (.+)$/)!![0]
//
// const octokit = new Octokit({
// auth: process.env.GITHUB_TOKEN
// })
//
// const repo = { owner: 'project-gauntlet', repo: 'gauntlet' };
//
// const response = await octokit.request('POST /repos/{owner}/{repo}/releases', {
// ...repo,
// tag_name: `v${version}`,
// target_commitish: 'main',
// name: `v${version}`,
// body: notesForCurrentRelease.join('\n'),
// });
//
// await octokit.request('POST /repos/{owner}/{repo}/releases/{release_id}/assets', {
// ...repo,
// release_id: response.data.id,
Expand Down

0 comments on commit 74ed792

Please sign in to comment.