3030 include :
3131 - target : x86_64-unknown-linux-gnu
3232 os : ubuntu-latest
33- - target : x86_64-apple-darwin
34- os : macos-latest
3533 - target : aarch64-apple-darwin
3634 os : macos-latest
3735 - target : x86_64-pc-windows-msvc
@@ -40,49 +38,39 @@ jobs:
4038 runs-on : ${{ matrix.os }}
4139 steps :
4240 - uses : actions/checkout@v4
43-
41+
4442 - name : Install Rust toolchain
4543 uses : dtolnay/rust-toolchain@stable
4644 with :
4745 targets : ${{ matrix.target }}
4846 components : rust-src
4947
50- - name : Install OpenSSL (macOS)
51- if : matrix.target == 'x86_64-apple-darwin'
52- run : |
53- brew install openssl@3
54- echo "OPENSSL_DIR=$(brew --prefix openssl@3)" >> $GITHUB_ENV
55- echo "PKG_CONFIG_PATH=$(brew --prefix openssl@3)/lib/pkgconfig" >> $GITHUB_ENV
56-
5748 - name : Cache dependencies
5849 uses : Swatinem/rust-cache@v2
5950
6051 - name : Build release binary
61- env :
62- OPENSSL_DIR : ${{ env.OPENSSL_DIR }}
63- PKG_CONFIG_PATH : ${{ env.PKG_CONFIG_PATH }}
6452 run : cargo build --verbose --release --target ${{ matrix.target }}
6553
6654 - name : Package release assets
6755 shell : bash
6856 run : |
6957 cd target/${{ matrix.target }}/release
70-
58+
7159 # Define binary name with extension if windows
7260 BIN_NAME=glimpse
7361 if [ "${{ matrix.os }}" = "windows-latest" ]; then
7462 BIN_NAME=glimpse.exe
7563 fi
76-
64+
7765 # Create archive name
7866 ARCHIVE_NAME=glimpse-${{ github.ref_name }}-${{ matrix.target }}
79-
67+
8068 # Create dist directory with required files
8169 mkdir -p $ARCHIVE_NAME
8270 cp $BIN_NAME $ARCHIVE_NAME/
8371 cp ../../../readme.md $ARCHIVE_NAME/
8472 cp ../../../LICENSE $ARCHIVE_NAME/
85-
73+
8674 # Create archive based on OS
8775 if [ "${{ matrix.os }}" = "windows-latest" ]; then
8876 7z a -tzip "${ARCHIVE_NAME}.zip" $ARCHIVE_NAME
@@ -108,17 +96,17 @@ jobs:
10896 with :
10997 repository : ${{ github.repository_owner }}/homebrew-glimpse
11098 token : ${{ secrets.HOMEBREW_TAP_TOKEN }}
111-
99+
112100 - name : Update formula
113101 run : |
114102 # Get tarball URL and SHA
115103 TARBALL_URL="https://github.com/${{ github.repository }}/archive/refs/tags/${{ github.ref_name }}.tar.gz"
116104 SHA256=$(curl -L $TARBALL_URL | shasum -a 256 | cut -d ' ' -f 1)
117-
105+
118106 # Update formula version and hash
119107 sed -i "s|url.*|url \"$TARBALL_URL\"|" Formula/glimpse.rb
120108 sed -i "s|sha256.*|sha256 \"$SHA256\"|" Formula/glimpse.rb
121-
109+
122110 - name : Commit and push changes
123111 run : |
124112 git config user.name "GitHub Actions"
0 commit comments