Skip to content

Commit

Permalink
work on release action
Browse files Browse the repository at this point in the history
Signed-off-by: Grant Ramsay <[email protected]>
  • Loading branch information
seapagan committed Oct 4, 2024
1 parent e652346 commit 24134be
Showing 1 changed file with 26 additions and 6 deletions.
32 changes: 26 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,34 @@ jobs:
profile: minimal

- name: Build the project
run: cargo build --release

# - name: Check release directory contents
# if: matrix.platform == 'windows-latest'
# shell: pwsh
# run: Get-ChildItem -Path target/release

- name: Rename the binary to .exe (Windows)
if: matrix.platform == 'windows-latest'
shell: pwsh
run: |
Rename-Item -Path target/release/bundlerepo -NewName bundlerepo.exe
Get-ChildItem -Path target/release
- name: Package the binary (Linux/macOS)
if: matrix.platform != 'windows-latest'
run: |
cargo build --release
BINARY_NAME="bundlerepo"
mkdir -p binaries
if [[ "${{ matrix.platform }}" == "windows-latest" ]]; then
cp target/release/*.exe binaries/
else
cp target/release/* binaries/
fi
tar -czvf binaries/${BINARY_NAME}-${{ matrix.platform }}.tar.gz -C target/release ${BINARY_NAME}
- name: Package the binary (Windows)
if: matrix.platform == 'windows-latest'
shell: pwsh
run: |
$BINARY_NAME = "bundlerepo.exe"
New-Item -ItemType Directory -Path binaries -Force
Compress-Archive -Path target/release/$BINARY_NAME -DestinationPath binaries\$BINARY_NAME.zip
- name: Upload Binaries
uses: actions/upload-artifact@v3
Expand Down

0 comments on commit 24134be

Please sign in to comment.