From 6f5d8834e423339e98c82fee9716f5ad15c02c2f Mon Sep 17 00:00:00 2001 From: SamTV12345 <40429738+SamTV12345@users.noreply.github.com> Date: Mon, 4 Sep 2023 21:57:10 +0200 Subject: [PATCH] Readded building windows with tar/Upload windows build on release * Use windows. * Fixed windows yml. * Also upload windows build on tag to release folder. * Added comment. * Updated file name to be in sync with release name. * Revert "Updated file name to be in sync with release name." This reverts commit 2fbc26a891fd5862cd7b5e85fec2daa1657e61fe. * Reverted and just rename at the end. --- .github/workflows/windows.yml | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index acbc50fdc..e2a2c8cef 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -15,22 +15,16 @@ jobs: || (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id) name: Build .zip runs-on: windows-latest - defaults: - run: - shell: msys2 {0} steps: - uses: msys2/setup-msys2@v2 with: - release: false - update: false path-type: inherit install: >- zip - rsync - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: @@ -41,17 +35,16 @@ jobs: src/bin/doc/package-lock.json - name: Install all dependencies and symlink for ep_etherpad-lite - run: | - set MSYSTEM=winsymlinks:lnk - src/bin/installDeps.sh + 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 - run: | - set MSYSTEM=winsymlinks:lnk - src/bin/buildForWindows.sh + shell: msys2 {0} + run: src/bin/buildForWindows.sh - name: Archive production artifacts uses: actions/upload-artifact@v3 @@ -69,7 +62,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v4 + uses: actions/checkout@v3 - name: Download .zip uses: actions/download-artifact@v3 @@ -96,7 +89,7 @@ jobs: # run on pushes to any branch # run on PRs from external forks permissions: - contents: none + contents: write if: | (github.event_name != 'pull_request') || (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id) @@ -130,3 +123,13 @@ jobs: node node_modules\ep_etherpad-lite\node\server.js & curl --connect-timeout 10 --max-time 20 --retry 5 --retry-delay 10 --retry-max-time 60 --retry-connrefused http://127.0.0.1:9001/p/test src\node_modules\cypress\bin\cypress run --config-file src\tests\frontendcypress\cypress.config.js + # On release, upload windows zip to GitHub release tab + - + name: Rename to etherpad-lite-win.zip + shell: powershell + run: mv etherpad-win.zip etherpad-lite-win.zip + - name: upload binaries to release + uses: softprops/action-gh-release@v1 + if: ${{startsWith(github.ref, 'refs/tags/') }} + with: + files: etherpad-lite-win.zip