44 workflow_dispatch :
55
66permissions :
7- contents : write
7+ contents : write
88
99env :
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 : |
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
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