Skip to content

Commit

Permalink
fix(ci): fix release bin to achieve
Browse files Browse the repository at this point in the history
  • Loading branch information
SARDONYX-sard committed Oct 7, 2023
1 parent 4490178 commit 4bfad9e
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions .github/workflows/release-cli.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ jobs:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
artifact_name: dar2oar
asset_name: dar2oar-x86_64-unknown-linux-gnu
asset_name: dar2oar-x86_64-unknown-linux-gnu.tar.gz
- os: ubuntu-latest
target: x86_64-unknown-linux-musl
artifact_name: dar2oar
asset_name: dar2oar-x86_64-unknown-linux-musl
asset_name: dar2oar-x86_64-unknown-linux-musl.tar.gz
- os: ubuntu-latest
target: x86_64-pc-windows-gnu
artifact_name: dar2oar.exe
asset_name: dar2oar-x86_64-pc-windows-gnu.exe
asset_name: dar2oar-x86_64-pc-windows-gnu.zip
- os: macos-latest
target: x86_64-apple-darwin
artifact_name: dar2oar
asset_name: dar2oar-x86_64-apple-darwin
asset_name: dar2oar-x86_64-apple-darwin.zip

runs-on: ${{ matrix.os }}

Expand Down Expand Up @@ -54,13 +54,21 @@ jobs:
token: ${{ github.token }}
tag: ${{ github.ref_name }}

- name: Compress binary
run: |
if [[ "${{ matrix.target }}" == *"linux"* ]]; then
tar -czf ${{ matrix.asset_name }} target/${{ matrix.target }}/release/${{ matrix.artifact_name }}
else
zip -r ${{ matrix.asset_name }} target/${{ matrix.target }}/release/${{ matrix.artifact_name }}
fi
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
release_name: DAR to OAR Converter v${{ github.ref }}
body: ${{ steps.changelog.outputs.changes }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/${{ matrix.target }}/release/${{ matrix.artifact_name }}
file: ${{ matrix.asset_name }}
asset_name: ${{ matrix.asset_name }}
tag: ${{ github.ref }}
overwrite: true
Expand All @@ -71,3 +79,4 @@ jobs:
branch: main
commit_message: "docs: update CHANGELOG.md for ${{ github.ref_name }} [skip ci]"
file_pattern: CHANGELOG.md
if: matrix.target == 'x86_64-pc-windows-gnu'

0 comments on commit 4bfad9e

Please sign in to comment.