Skip to content

Commit 81cf8e5

Browse files
committed
Updated build script
1 parent 26992f1 commit 81cf8e5

File tree

3 files changed

+55
-2
lines changed

3 files changed

+55
-2
lines changed

Denna/Denna/Denna.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<PackageCertificateThumbprint>377F5451BD3C45B7EDE373B6332AB15E75BD9C59</PackageCertificateThumbprint>
2222
<AppxAutoIncrementPackageRevision>True</AppxAutoIncrementPackageRevision>
2323
<AppxBundle>Always</AppxBundle>
24-
<AppxBundlePlatforms>x86|arm</AppxBundlePlatforms>
24+
<AppxBundlePlatforms>x86</AppxBundlePlatforms>
2525
<GenerateAppInstallerFile>False</GenerateAppInstallerFile>
2626
<AppInstallerUpdateFrequency>1</AppInstallerUpdateFrequency>
2727
<AppInstallerCheckForUpdateFrequency>OnApplicationRun</AppInstallerCheckForUpdateFrequency>

Denna/Denna/Package.appxmanifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" IgnorableNamespaces="uap mp">
3-
<Identity Name="45104MAHStudio.Denna" Publisher="CN=44988219-A722-4FA5-9335-1E47D73A1418" Version="2.0.14.0" />
3+
<Identity Name="45104MAHStudio.Denna" Publisher="CN=44988219-A722-4FA5-9335-1E47D73A1418" Version="2.0.15.0" />
44
<mp:PhoneIdentity PhoneProductId="fe9a93bd-2c83-4cb0-9fe3-8a46683b97c9" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
55
<Properties>
66
<DisplayName>Denna</DisplayName>

Denna/appcenter-post-build.ps1

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,56 @@ https://t.me/joinchat/EJ9gLURDAcbOxpoIGSdD8g
1010
echo $megtxt;
1111
Invoke-WebRequest -Uri "https://api.telegram.org/bot$env:BotSecret/sendMessage?chat_id=$env:chatId&text=$megtxt"
1212
Invoke-WebRequest -Uri "https://api.telegram.org/bot$env:BotSecret/sendMessage?chat_id=$env:ChannelId&text=$megtxt"
13+
14+
15+
Compress-Archive -path "$env:APPCENTER_SOURCE_DIRECTORY\Denna\Denna\AppPackages" -DestinationPath "$env:APPCENTER_SOURCE_DIRECTORY\Denna\Denna\Build.zip"
16+
17+
18+
19+
$versionNumber = $env:APPCENTER_BUILD_ID
20+
$preRelease = $TRUE
21+
$releaseNotes=$megtxt
22+
$artifactOutputDirectory="$env:APPCENTER_SOURCE_DIRECTORY\Denna\Denna"
23+
$artifact="Build.zip"
24+
$gitHubUsername="MahStudio"
25+
$gitHubRepository="Denna"
26+
$gitHubApiKey="$env:GithubSicktear"
27+
$draft = $FALSE
28+
29+
$releaseData = @{
30+
tag_name = [string]::Format("v{0}", $versionNumber);
31+
name = [string]::Format("v{0}", $versionNumber);
32+
body = $releaseNotes;
33+
draft = $draft;
34+
prerelease = $preRelease;
35+
}
36+
37+
$auth = 'Basic ' + [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes($gitHubApiKey + ":x-oauth-basic"));
38+
39+
$releaseParams = @{
40+
Uri = "https://api.github.com/repos/$gitHubUsername/$gitHubRepository/releases";
41+
Method = 'POST';
42+
Headers = @{
43+
Authorization = $auth;
44+
}
45+
ContentType = 'application/json';
46+
Body = (ConvertTo-Json $releaseData -Compress)
47+
}
48+
49+
$result = Invoke-RestMethod @releaseParams
50+
$uploadUri = $result | Select -ExpandProperty upload_url
51+
Write-Host $uploadUri
52+
$uploadUri = $uploadUri -creplace '\{\?name,label\}' #, "?name=$artifact"
53+
$uploadUri = $uploadUri + "?name=$artifact"
54+
$uploadFile = Join-Path -path $artifactOutputDirectory -childpath $artifact
55+
56+
$uploadParams = @{
57+
Uri = $uploadUri;
58+
Method = 'POST';
59+
Headers = @{
60+
Authorization = $auth;
61+
}
62+
ContentType = 'application/zip';
63+
InFile = $uploadFile
64+
}
65+
$result = Invoke-RestMethod @uploadParams

0 commit comments

Comments
 (0)