summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClement Tsang <34804052+ClementTsang@users.noreply.github.com>2020-11-27 10:50:25 -0500
committerGitHub <noreply@github.com>2020-11-27 10:50:25 -0500
commita9c1197075d7897cc3066657820eb321434eb0c0 (patch)
tree04afd1b36a5f65ee7504c5e03e8e676f101a8fc1
parent7131a05e626bd49467bb3e3e2818a43783443853 (diff)
ci: Fix post-deploy step to actually use the correct files (#332)
Previously it was CURL-ing from a non-existent URL, giving the wrong SHA hashes. Changed to upload the binaries as artifacts and using those directly.
-rw-r--r--.github/workflows/deployment.yml24
1 files changed, 14 insertions, 10 deletions
diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml
index b584d390..d6dbb4b1 100644
--- a/.github/workflows/deployment.yml
+++ b/.github/workflows/deployment.yml
@@ -221,6 +221,7 @@ jobs:
- name: Upload main release
uses: actions/upload-release-asset@v1.0.1
+ id: upload
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
@@ -229,6 +230,16 @@ jobs:
asset_name: ${{ env.ASSET }}
asset_content_type: application/octet-stream
+ - name: Add download asset to artifact if required
+ if: matrix.triple.target == 'x86_64-unknown-linux-gnu' || matrix.triple.target == 'x86_64-pc-windows-msvc' || matrix.triple.target == 'i686-pc-windows-msvc' || matrix.triple.target == 'x86_64-apple-darwin'
+ run: cp ${{ env.ASSET }} artifacts/
+
+ - name: Upload artifacts
+ uses: actions/upload-artifact@v1
+ with:
+ name: artifacts
+ path: artifacts
+
- name: Build msi file (Windows x86-64 MSVC)
if: matrix.triple.target == 'x86_64-pc-windows-msvc'
shell: powershell
@@ -327,7 +338,7 @@ jobs:
name: artifacts
path: artifacts
- - name: Set release upload URL and release version
+ - name: Set release upload URL, download URL and version
shell: bash
run: |
release_upload_url="$(cat ./artifacts/release-upload-url)"
@@ -340,16 +351,9 @@ jobs:
echo "Release upload url: ${{ env.RELEASE_UPLOAD_URL }}"
echo "Release version: ${{ env.RELEASE_VERSION }}"
- - name: Download packages
- run: |
- curl -LO "https://github.com/ClementTsang/bottom/releases/download/${{ env.RELEASE_VERSION }}/bottom_x86_64-unknown-linux-gnu.tar.gz";
- curl -LO "https://github.com/ClementTsang/bottom/releases/download/${{ env.RELEASE_VERSION }}/bottom_x86_64-apple-darwin.tar.gz";
- curl -LO "https://github.com/ClementTsang/bottom/releases/download/${{ env.RELEASE_VERSION }}/bottom_i686-pc-windows-msvc.zip";
- curl -LO "https://github.com/ClementTsang/bottom/releases/download/${{ env.RELEASE_VERSION }}/bottom_x86_64-pc-windows-msvc.zip";
-
- 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" ${{ env.RELEASE_VERSION }} "./deployment/windows/choco/bottom.nuspec.template" "./deployment/windows/choco/chocolateyinstall.ps1.template" "bottom.nuspec" "tools/chocolateyinstall.ps1" "tools/"
+ python "./deployment/windows/choco/choco_packager.py" "./artifacts/bottom_i686-pc-windows-msvc.zip" "./artifacts/bottom_x86_64-pc-windows-msvc.zip" ${{ env.RELEASE_VERSION }} "./deployment/windows/choco/bottom.nuspec.template" "./deployment/windows/choco/chocolateyinstall.ps1.template" "bottom.nuspec" "tools/chocolateyinstall.ps1" "tools/"
zip -r choco.zip "bottom.nuspec" "tools"
- name: Upload choco.zip to release
@@ -364,7 +368,7 @@ jobs:
- name: Execute Homebrew packaging script
run: |
- python "./deployment/packager.py" ${{ env.RELEASE_VERSION }} "./deployment/macos/homebrew/bottom.rb.template" "./bottom.rb" "SHA256" "./bottom_x86_64-apple-darwin.tar.gz" "./bottom_x86_64-unknown-linux-gnu.tar.gz";
+ python "./deployment/packager.py" ${{ env.RELEASE_VERSION }} "./deployment/macos/homebrew/bottom.rb.template" "./bottom.rb" "SHA256" "./artifacts/bottom_x86_64-apple-darwin.tar.gz" "./artifacts/bottom_x86_64-unknown-linux-gnu.tar.gz";
- name: Upload bottom.rb to release
uses: actions/upload-release-asset@v1.0.1