Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
Puyodead1 committed Dec 22, 2023
1 parent 46f44b8 commit 1c1e788
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,19 +108,21 @@ async function run(): Promise<void> {
const targetInfo = getTargetInfo(targetPath);
const info = getInfo(projectPath, targetInfo, configArg);

const originalAppVersion = info.version.split('+')[0];
const githubRunId = context.runId;
const githubRunNumber = context.runNumber;
const buildId = `${githubRunId}${githubRunNumber}`;
const fullVersion = `${originalAppVersion}+${buildId}`;

if (tagName && !releaseId) {
const templates = [
{
key: '__VERSION__',
value: info.version.split('+')[0],
value: originalAppVersion,
},
{
key: '__FULL_VERSION__',
value: info.version,
value: fullVersion,
},
{
key: '__SHORT_SHA__',
Expand Down Expand Up @@ -161,7 +163,7 @@ async function run(): Promise<void> {
core.setOutput('releaseUploadUrl', releaseData.uploadUrl);
core.setOutput('releaseId', releaseData.id.toString());
core.setOutput('releaseHtmlUrl', releaseData.htmlUrl);
core.setOutput('appVersion', info.version);
core.setOutput('appVersion', fullVersion);
}

if (releaseId) {
Expand Down Expand Up @@ -196,9 +198,7 @@ async function run(): Promise<void> {
await uploadVersionJSON({
owner,
repo,
version: buildIdAsVersion
? `${info.version}+${buildId}`
: info.version,
version: buildIdAsVersion ? fullVersion : originalAppVersion,
notes: body,
tagName,
releaseId,
Expand Down

0 comments on commit 1c1e788

Please sign in to comment.