artifacts: Windows CI Installer

* Windows CI Installer

This PR introduces CI builds of a windows installer(using NSIS) .

It builds an executable that installs Etherpad and runs it.

There are obvious steps to make once this has been merged. But I'd suggest on each release we include both the .zip and the .exe and allow users to have a portable zip or an installed executable.

https://github.com/ether/etherpad_nsis

This was a relatively rushed project (4 hours) and I didn't want to spend any more time on it so it will need a foster parent to maintain it :)

props to @joncloud for https://github.com/joncloud/makensis-action-test and the nsis team that while have a horrible UX make relatively easy to use and rapid tools.

Note for review: I'm using linux to build the windows executable, this may need to be reviewed and we might want to switch to Windows if we can confirm building on linux causes a problem.

* CI: Use Windows to build the .zip
pull/4869/head
John McLear 2021-02-25 10:00:33 +00:00 committed by GitHub
parent 4a65acf417
commit fc7acad846
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 61 additions and 0 deletions

61
.github/workflows/windows-installer.yml vendored Normal file
View File

@ -0,0 +1,61 @@
name: "Windows Installer"
# any branch is useful for testing before a PR is submitted
on: [push, pull_request]
jobs:
build:
# run on pushes to any branch
# run on PRs from external forks
if: |
(github.event_name != 'pull_request')
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
name: Build Zip & Exe
runs-on: windows-latest
steps:
- uses: msys2/setup-msys2@v2
with:
path-type: inherit
install: >-
zip
- name: Checkout repository
uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 12
- name: Install all dependencies and symlink for ep_etherpad-lite
shell: msys2 {0}
run: src/bin/installDeps.sh
- name: Run the backend tests
shell: msys2 {0}
run: cd src && npm test
- name: Build the .zip
shell: msys2 {0}
run: src/bin/buildForWindows.sh
- name: Extract the .zip into folder
run: 7z x etherpad-lite-win.zip -oetherpad-lite-new
- name: Grab nsis config
run: git clone https://github.com/ether/etherpad_nsis.git
- name: Create installer
uses: joncloud/makensis-action@v3.4
with:
script-file: 'etherpad_nsis/etherpad.nsi'
- name: Check something..
run: ls etherpad_nsis
- name: Archive production artifacts
uses: actions/upload-artifact@v2
with:
name: etherpad-server-windows.exe
path: etherpad_nsis/etherpad-server-windows.exe