Add appinstaller for windows nightlies

pull/1635/head
Nicolas Werner 11 months ago
parent 6ec91b6efc
commit faaeef134f
No known key found for this signature in database
GPG Key ID: C8D75E610773F2D9
  1. 28
      .gitlab-ci.yml
  2. 10
      resources/NhekoNightly.appinstaller

@ -70,17 +70,43 @@ upload-windows:
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/alpine:latest
tags: [docker]
rules:
- if: '$CI_PIPELINE_TRIGGERED == null && $CI_COMMIT_REF_PROTECTED == "true" && $CI_COMMIT_TAG =~ /^v\d+\.\d+\.\d+$/'
variables:
PACKAGE_NAME: "windows"
- if: '$CI_PIPELINE_TRIGGERED == null && $CI_COMMIT_REF_PROTECTED == "true"'
variables:
GIT_STRATEGY: none
PACKAGE_NAME: "windows-nightly"
before_script:
- apk add curl unzip
script:
- export VERSION=$(unzip -p artifacts/nheko.msix AppxManifest.xml | sed -n 's/.* Version="\([0-9.]*\)".*/\1/p')
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file artifacts/nheko.msix "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/windows-nightly/${VERSION}/nheko.msix"'
- 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file artifacts/nheko.msix "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/${PACKAGE_NAME}/${VERSION}/nheko.msix"'
needs:
- job: codesign-windows
pages:
stage: deploy
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/alpine:latest
tags: [docker]
rules:
- if: '$CI_PIPELINE_TRIGGERED == null && $CI_COMMIT_REF_PROTECTED == "true"'
interruptible: true
before_script:
- apk add curl jq
script:
- export LATEST_WINDOWS_NIGHTLY=$(curl "https://nheko.im/api/v4/projects/2/packages?package_name=windows-nightly&order_by=version&sort=desc" | jq -r '.[0].version')
- sed "s/0.11.3.4/${LATEST_WINDOWS_NIGHTLY}/g" -i resources/NhekoNightly.appinstaller
- mkdir public
- mv resources/NhekoNightly.appinstaller public
needs:
- job: upload-windows
optional: true
artifacts: false
artifacts:
paths:
- public
build-clazy:
stage: build
image: ${CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX}/alpine:latest

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<AppInstaller Uri="https://nheko-reborn.pages.nheko.im/nheko/NhekoNightly.appinstaller" Version="0.0.0.1" xmlns="http://schemas.microsoft.com/appx/appinstaller/2018">
<MainPackage Name="im.nheko.Nheko" Version="0.11.3.4" Publisher="CN=Nicolas Werner, O=Nicolas Werner, L=Munich, S=Bavaria, C=DE" Uri="https://nheko.im/api/v4/projects/2/packages/generic/windows-nightly/0.11.3.4/nheko.msix" ProcessorArchitecture="x64" />
<UpdateSettings>
<!-- We can't set this to check only once a month, so just check once a week. If the user doesn't want that ping, they should install the msix directly. -->
<OnLaunch HoursBetweenUpdateChecks="168" ShowPrompt="true" />
<ForceUpdateFromAnyVersion>true</ForceUpdateFromAnyVersion>
</UpdateSettings>
</AppInstaller>
Loading…
Cancel
Save