Skip to content

Commit

Permalink
Fix windows release... again (#3470)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
ChrisPenner authored Sep 29, 2022
1 parent 9469b94 commit 0e48067
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 12 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/pre-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 11 additions & 6 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0e48067

Please sign in to comment.