Skip to content

Commit 46d7170

Browse files
committed
fixing
1 parent cb0a595 commit 46d7170

File tree

1 file changed

+15
-17
lines changed

1 file changed

+15
-17
lines changed

.github/workflows/cli.yml

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
workflow_dispatch:
55

66
permissions:
7-
contents: write
7+
contents: write
88

99
env:
1010
CARGO_TERM_COLOR: always
@@ -20,17 +20,17 @@ jobs:
2020
- uses: actions/checkout@v3
2121
with:
2222
fetch-depth: 0
23-
23+
2424
- name: Fetch all tags
2525
run: git fetch --tags --force
26-
26+
2727
- name: Get latest tag
2828
id: get_latest_tag
2929
run: |
3030
LATEST_TAG=$(git tag | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$' | sort -V | tail -1)
3131
echo "Latest tag: $LATEST_TAG"
3232
echo "latest_tag=$LATEST_TAG" >> $GITHUB_OUTPUT
33-
33+
3434
- name: Calculate next version
3535
id: next_version
3636
run: |
@@ -50,7 +50,7 @@ jobs:
5050
fi
5151
echo "Next tag: $NEXT_TAG"
5252
echo "next_tag=$NEXT_TAG" >> $GITHUB_OUTPUT
53-
53+
5454
- name: Create GitHub Release
5555
id: create_release
5656
uses: actions/create-release@v1
@@ -68,7 +68,14 @@ jobs:
6868

6969
strategy:
7070
matrix:
71-
os: [ubuntu-latest, ubuntu-24.04-arm, macos-13, macos-latest, windows-latest]
71+
os:
72+
[
73+
ubuntu-latest,
74+
ubuntu-24.04-arm,
75+
macos-13,
76+
macos-latest,
77+
windows-latest,
78+
]
7279
include:
7380
- os: ubuntu-latest
7481
target: x86_64-unknown-linux-gnu
@@ -106,21 +113,12 @@ jobs:
106113
run: |
107114
cd helix-cli
108115
cargo build --release --target ${{ matrix.target }}
109-
- name: Rename binary
110-
run: |
111-
if [ "${{ matrix.os }}" == "windows-latest" ]; then
112-
mv helix-cli/target/${{ matrix.target }}/release/helix.exe ${{ matrix.binary_name }}
113-
else
114-
mv helix-cli/target/${{ matrix.target }}/release/helix ${{ matrix.binary_name }}
115-
fi
116-
shell: bash
117-
118116
- name: Upload Release Asset
119117
uses: actions/upload-release-asset@v1
120118
with:
121119
upload_url: ${{ needs.create_release.outputs.upload_url }}
122-
asset_path: ${{ matrix.binary_name }}
120+
asset_path: target/${{ matrix.target }}/release/${{ matrix.os == 'windows-latest' && 'helix.exe' || 'helix' }}
123121
asset_name: ${{ matrix.binary_name }}
124122
asset_content_type: application/octet-stream
125123
env:
126-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
124+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)