From 0e48067374ba900d6b9c8a65ad6948322ac916e6 Mon Sep 17 00:00:00 2001 From: Chris Penner Date: Thu, 29 Sep 2022 13:08:39 -0600 Subject: [PATCH] Fix windows release... again (#3470) * Use gh instead of wget on windows * GH Token * Try switching back to powershell to just get things working :| * Swap pre-release to use powershell as well --- .github/workflows/pre-release.yaml | 17 +++++++++++------ .github/workflows/release.yaml | 17 +++++++++++------ 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/.github/workflows/pre-release.yaml b/.github/workflows/pre-release.yaml index 8af2618fbd..1e2ece8c10 100644 --- a/.github/workflows/pre-release.yaml +++ b/.github/workflows/pre-release.yaml @@ -111,13 +111,18 @@ jobs: run: stack --no-terminal build --flag unison-parser-typechecker:optimized - name: fetch latest codebase-ui and package with ucm + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # Powershell + shell: pwsh run: | - mkdir -p /tmp/ucm/ui - UCM="$(stack path | awk '/local-install-root/{print $2}')/bin/unison" - cp "$UCM" /tmp/ucm/ucm - wget -O /tmp/unisonLocal.zip https://github.com/unisonweb/unison-local-ui/releases/download/latest/unisonLocal.zip - tar.exe -xf /tmp/unisonLocal.zip --directory /tmp/ucm/ui - tar.exe -a -c -f ucm-windows.zip /tmp/ucm + mkdir -p tmp\ui + mkdir -p release\ui + $UCM = .\stack\stack-2.7.5-windows-x86_64\stack.exe exec -- where unison + cp $UCM .\release\ucm.exe + Invoke-WebRequest -Uri https://github.com/unisonweb/unison-local-ui/releases/download/latest/unisonLocal.zip -OutFile tmp\unisonLocal.zip + Expand-Archive -Path tmp\unisonLocal.zip -DestinationPath release\ui + Compress-Archive -Path .\release\* -DestinationPath ucm-windows.zip - name: Upload windows artifact uses: actions/upload-artifact@v2 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 48480aaefe..3c1599996f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -248,13 +248,18 @@ jobs: done - name: fetch latest Unison Local UI and package with ucm + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # Powershell + shell: pwsh run: | - mkdir -p /tmp/ucm/ui - UCM="$(stack path | awk '/local-install-root/{print $2}')/bin/unison" - cp "$UCM" /tmp/ucm/ucm - wget -O /tmp/unisonLocal.zip https://github.com/unisonweb/unison-local-ui/releases/download/latest/unisonLocal.zip - tar.exe -xf /tmp/unisonLocal.zip --directory /tmp/ucm/ui - tar.exe -a -c -f ucm-windows.zip /tmp/ucm + mkdir -p tmp\ui + mkdir -p release\ui + $UCM = .\stack\stack-2.7.5-windows-x86_64\stack.exe exec -- where unison + cp $UCM .\release\ucm.exe + Invoke-WebRequest -Uri https://github.com/unisonweb/unison-local-ui/releases/download/latest/unisonLocal.zip -OutFile tmp\unisonLocal.zip + Expand-Archive -Path tmp\unisonLocal.zip -DestinationPath release\ui + Compress-Archive -Path .\release\* -DestinationPath ucm-windows.zip - name: Upload windows artifact uses: actions/upload-artifact@v2