Skip to content

Commit aca81a6

Browse files
committed
Create MSIX Windows installer
The winget package manager requires installers. It cannot install .exe files itself. Create an MSIX-based installer for quick-lint-js. This MSIX installer will be used in the future to add quick-lint-js to winget. Also, add code to sign a MSIX file. This requires a lot of code because Go's archive/zip package produces ZIP files which can't be read by Microsoft's APPX/MSIX installer stuff for some reason, and because we need to recreate AppxBlockMap.xml when swapping out quick-lint-js.exe.
1 parent bc7412f commit aca81a6

File tree

13 files changed

+1179
-2
lines changed

13 files changed

+1179
-2
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ indent_style = tab
3737
max_line_length = off
3838

3939
# Keep in sync with Prettier.
40-
[*.{css,html,js,json,mjs}]
40+
[*.{css,html,js,json,mjs,xml}]
4141
indent_size = 2
4242
indent_style = space
4343
max_line_length = 80

.github/workflows/build-static.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,44 @@ jobs:
347347
remote-directory: ${{ secrets.artifacts_root }}/builds/${{ github.sha }}/scoop/
348348
user: ${{ secrets.artifacts_user }}
349349

350+
package-msix:
351+
name: MSIX installer
352+
needs: build
353+
runs-on: windows-2022
354+
steps:
355+
- name: checkout
356+
uses: actions/checkout@v2
357+
- uses: actions/download-artifact@v2
358+
with:
359+
name: quick-lint-js-windows-${{ github.sha }}
360+
path: ./
361+
362+
- name: extract ZIP
363+
run: Expand-Archive -LiteralPath windows.zip -DestinationPath quick-lint-js
364+
shell: powershell
365+
366+
- name: create MSIX
367+
run: |
368+
PATH="${PATH}:/c/Program Files (x86)/Windows Kits/10/App Certification Kit"
369+
go run ./dist/msix/build-unsigned-msix.go -EXE ./quick-lint-js/bin/quick-lint-js.exe -License ./quick-lint-js/share/doc/quick-lint-js/copyright -Out quick-lint-js.msix
370+
shell: bash
371+
372+
- name: upload MSIX to workflow
373+
uses: actions/upload-artifact@v2
374+
with:
375+
if-no-files-found: error
376+
name: quick-lint-js-msix-${{ github.sha }}
377+
path: quick-lint-js.msix
378+
- name: upload MSIX to long-term storage
379+
if: ${{ github.event_name == 'push' && github.repository_owner == 'quick-lint' != null }}
380+
uses: quick-lint/sftp-upload@master
381+
with:
382+
host: ${{ secrets.artifacts_host }}
383+
local-file-globs: quick-lint-js.msix
384+
private-key: ${{ secrets.artifacts_key }}
385+
remote-directory: ${{ secrets.artifacts_root }}/builds/${{ github.sha }}/windows/
386+
user: ${{ secrets.artifacts_user }}
387+
350388
# quick-lint-js finds bugs in JavaScript programs.
351389
# Copyright (C) 2020 Matthew Glazar
352390
#

0 commit comments

Comments
 (0)