ci: Fix windows deployments (#323)

Fixes an issue in the windows deployment action.
This commit is contained in:
Clement Tsang 2020-11-22 09:40:29 -08:00 committed by GitHub
parent 7887de2aba
commit 0bf885a8cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 5 deletions

View file

@ -21,7 +21,15 @@ jobs:
if: env.VERSION == ''
run: |
echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
echo "version is: ${{ env.VERSION }}"
# - name: Hard-coded release version for testing
# if: env.VERSION == ''
# run: |
# echo "VERSION=0.5.1" >> $GITHUB_ENV
- name: Validate the release version from the tag
run: |
echo "Version is: ${{ env.VERSION }}"
- name: Create GitHub release
id: release
@ -195,7 +203,7 @@ jobs:
shell: bash
run: |
cp target/${{ matrix.triple.target }}/release/btm.exe btm.exe
zip -r bottom_${{ matrix.triple.target }}.zip "btm.exe", "completion"
zip -r bottom_${{ matrix.triple.target }}.zip "btm.exe" "completion"
echo "ASSET=bottom_${{ matrix.triple.target }}.zip" >> $GITHUB_ENV
- name: Bundle release and completion (Linux and macOS)

View file

@ -32,8 +32,10 @@ jobs:
- name: Execute choco packaging script
run: |
python "./deployment/windows/choco/choco_packager.py" "bottom_i686-pc-windows-msvc.zip" "bottom_x86_64-pc-windows-msvc.zip" $RELEASE_VERSION "./deployment/windows/choco/bottom.nuspec.template" "./deployment/windows/choco/chocolateyinstall.ps1.template" "./deployment/windows/choco/bottom.nuspec" "./deployment/windows/choco/tools/chocolateyinstall.ps1" "./deployment/windows/choco/tools/";
zip -r choco.zip "./deployment/windows/choco/bottom.nuspec" "./deployment/windows/choco/tools/";
python "./deployment/windows/choco/choco_packager.py" "bottom_i686-pc-windows-msvc.zip" "bottom_x86_64-pc-windows-msvc.zip" $RELEASE_VERSION "./deployment/windows/choco/bottom.nuspec.template" "./deployment/windows/choco/chocolateyinstall.ps1.template" "./deployment/windows/choco/bottom.nuspec" "./deployment/windows/choco/tools/chocolateyinstall.ps1" "./deployment/windows/choco/tools/"
cd ./deployment/windows/choco
zip -r choco.zip "bottom.nuspec" "./tools"
cd ../../../
- name: Upload choco.zip to release
uses: svenstaro/upload-release-action@2.1.0

View file

@ -172,7 +172,7 @@ Choco package located [here](https://chocolatey.org/packages/bottom).
choco install bottom
# Version number may be required for newer releases, if available:
choco install bottom --version=0.5.1
choco install bottom --version=0.5.0 # 0.5.1 requires 0.5.0 to be accepted first, unfortunately...
```
### winget