Skip to content
Snippets Groups Projects
Verified Commit faaeef13 authored by Nicolas Werner's avatar Nicolas Werner
Browse files

Add appinstaller for windows nightlies

parent 6ec91b6e
No related branches found
No related tags found
No related merge requests found
Pipeline #5415 failed
......@@ -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"'
- 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
......
<?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>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment