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