Skip to content

Commit ad8f1d9

Browse files
committed
final
1 parent f22bee5 commit ad8f1d9

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

.github/workflows/release.yml

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,31 +9,33 @@ env:
99
CARGO_TERM_COLOR: always
1010

1111
jobs:
12-
# Create the release without assets, saves the upload url for later jobs to upload assets to
12+
# Create the release without assets
1313
create_release:
1414
name: Create release
1515
runs-on: ubuntu-latest
1616
steps:
1717
- uses: actions/checkout@v3
18-
# - name: Ensure tag matches cargo version
19-
# run: |
20-
# CARGO_PKG_VERSION=$(cargo pkgid | cut -d# -f2)
21-
# if [ "${{ github.ref_name }}" != "$CARGO_PKG_VERSION" ]; then
22-
# echo "Tag ${{ github.ref_name }} does not match cargo version $CARGO_PKG_VERSION"
23-
# exit 1
24-
# fi
18+
- name: Ensure tag matches cargo version
19+
run: |
20+
CARGO_PKG_VERSION=$(cargo pkgid | cut -d# -f2)
21+
if [ "${{ github.ref_name }}" != "$CARGO_PKG_VERSION" ]; then
22+
echo "Tag ${{ github.ref_name }} does not match cargo version $CARGO_PKG_VERSION"
23+
exit 1
24+
fi
2525
- name: Prepare release notes
2626
run: node .github/scripts/get-release-notes.js ${{ github.ref_name }} >> release_notes.md
2727
- name: Create release
2828
uses: softprops/action-gh-release@v1
2929
with:
30-
# tag_name: ${{ github.ref_name }}
3130
body_path: ./release_notes.md
3231

32+
# Create the binaries and upload them as release assets
3333
create_binaries:
34-
name: Create binaries
34+
name: Create binary
3535
needs: create_release
3636
runs-on: ${{ matrix.os }}
37+
env:
38+
BINARY_EXT: ${{ matrix.os == 'windows-latest' && '.exe' || '' }}
3739
strategy:
3840
fail-fast: false
3941
matrix:
@@ -57,12 +59,8 @@ jobs:
5759
- name: Build
5860
run: cargo build --bin uiua --release --target ${{ matrix.target }} --verbose
5961

60-
- if: matrix.os == 'windows-latest'
61-
name: Zip (Windows)
62-
run: 7z a -tzip uiua-bin-${{matrix.target}}.zip ./target/${{matrix.target}}/release/uiua.exe
63-
- if: matrix.os != 'windows-latest'
64-
name: Zip (Linux/MacOS)
65-
run: 7z a -tzip uiua-bin-${{matrix.target}}.zip ./target/${{matrix.target}}/release/uiua
62+
- name: Zip
63+
run: 7z a -tzip uiua-bin-${{matrix.target}}.zip ./target/${{matrix.target}}/release/uiua${{env.BINARY_EXT}}
6664

6765
- name: Upload release assets
6866
uses: softprops/action-gh-release@v1

0 commit comments

Comments
 (0)