Skip to content

Commit

Permalink
Merge pull request #4 from honhimW/release-action
Browse files Browse the repository at this point in the history
Update release.yml
  • Loading branch information
honhimW authored Sep 14, 2024
2 parents fa8ed32 + d21ef16 commit 60b1b68
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,27 @@ jobs:
uses: actions/checkout@v4
- name: Build
run: cargo build --release --verbose
- name: Package (Linux)
if: matrix.os == 'ubuntu-latest'
run: tar -czvf ./target/release/ratisui-linux-amd64.tar.gz LICENSE README.md -C ./target/release ratisui

- name: Package (Mac)
if: matrix.os == 'macos-latest'
run: tar -czvf ./target/release/ratisui-mac.tar.gz LICENSE README.md -C ./target/release ratisui

- name: Package (Windows)
if: matrix.os == 'windows-latest'
run: Compress-Archive -Path '.\README.md', '.\LICENSE', '.\target\release\ratisui.exe' -DestinationPath '.\target\release\ratisui-windows-amd64.zip'

- name: Upload Release Asset (Linux)
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_path: ./target/release/ratisui
asset_name: ratisui-linux
asset_path: ./target/release/ratisui-linux-amd64.tar.gz
asset_name: ratisui-linux-amd64.tar.gz
asset_content_type: application/octet-stream
- name: Upload Release Asset (Mac)
if: matrix.os == 'macos-latest'
Expand All @@ -67,16 +79,17 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_path: ./target/release/ratisui
asset_name: ratisui-mac
asset_path: ./target/release/ratisui-mac.tar.gz
asset_name: ratisui-mac.tar.gz
asset_content_type: application/octet-stream

- name: Upload Release Asset (Windows)
if: matrix.os == 'windows-latest'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_path: .\target\release\ratisui.exe
asset_name: ratisui.exe
asset_path: .\target\release\ratisui-windows-amd64.zip
asset_name: ratisui-windows-amd64.zip
asset_content_type: application/octet-stream

0 comments on commit 60b1b68

Please sign in to comment.