Skip to content
This repository has been archived by the owner on Sep 8, 2024. It is now read-only.

Commit

Permalink
feat: random tag name
Browse files Browse the repository at this point in the history
  • Loading branch information
crashmax-dev committed Dec 5, 2023
1 parent 83035d9 commit 07eb8b4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion build-artifacts.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ import path from "node:path";
import fs from "node:fs/promises";
import Zip from "adm-zip";

function randomTagName() {
return Math.random().toString(36).slice(2, 8);
}

/** @param {import('@types/github-script').AsyncFunctionArguments} AsyncFunctionArguments */
export default async function build({ github, context }) {
const artifactsDirectoryPath = path.join(process.cwd(), "artifacts");
Expand All @@ -17,7 +21,7 @@ export default async function build({ github, context }) {
repo: context.repo.repo,
draft: false,
prerelease: false,
tag_name: "latest",
tag_name: randomTagName(),
});

async function uploadArtifact(name, path) {
Expand Down

0 comments on commit 07eb8b4

Please sign in to comment.