Skip to content

Commit

Permalink
b
Browse files Browse the repository at this point in the history
  • Loading branch information
Puyodead1 committed Dec 22, 2023
1 parent 1c1e788 commit 27ae46b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 22 deletions.
3 changes: 0 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ inputs:
includeUpdaterJson:
description: 'whether to upload a static JSON file for the updater using GitHub Releases as the CDN'
default: true
buildIdAsVersion:
description: 'whether to use a custom CI based build id as the version for the updater JSON file or not.'
default: false
updaterJsonPreferNsis:
description: 'whether the action will use the NSIS (setup.exe) or WiX (.msi) bundles for the updater JSON if both types exist. Will default to false for Tauri v1 and true for Tauri v2+'
updaterJsonKeepUniversal:
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

21 changes: 3 additions & 18 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ async function run(): Promise<void> {
const includeRelease = core.getBooleanInput('includeRelease');
const includeDebug = core.getBooleanInput('includeDebug');
const includeUpdaterJson = core.getBooleanInput('includeUpdaterJson');
const buildIdAsVersion = core.getBooleanInput('buildIdAsVersion');
const updaterJsonKeepUniversal = core.getBooleanInput(
'updaterJsonKeepUniversal',
);
Expand Down Expand Up @@ -108,21 +107,11 @@ 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: originalAppVersion,
},
{
key: '__FULL_VERSION__',
value: fullVersion,
value: info.version.split('+')[0],
},
{
key: '__SHORT_SHA__',
Expand All @@ -132,10 +121,6 @@ async function run(): Promise<void> {
key: '__SHA__',
value: context.sha,
},
{
key: '__BUILD_ID__',
value: buildId,
},
{
key: '__BRANCH__',
value: context.ref.replace('refs/heads/', ''),
Expand Down Expand Up @@ -163,7 +148,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', fullVersion);
core.setOutput('appVersion', info.version.split('+')[0]);
}

if (releaseId) {
Expand Down Expand Up @@ -198,7 +183,7 @@ async function run(): Promise<void> {
await uploadVersionJSON({
owner,
repo,
version: buildIdAsVersion ? fullVersion : originalAppVersion,
version: info.version.split('+')[0],
notes: body,
tagName,
releaseId,
Expand Down

0 comments on commit 27ae46b

Please sign in to comment.