diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 43b665f..32b0ae1 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -2,7 +2,7 @@ name: release on: push: branches: - - main + - release-test jobs: create-release: name: create-release @@ -20,10 +20,10 @@ jobs: run: | echo "RG_VERSION=$GITHUB_REF_NAME" >> $GITHUB_ENV echo "version is: ${{ env.RG_VERSION }}" - - name: Create GitHub release - env: - GH_TOKEN: ${{ github.token }} - run: gh release create ${{ env.RG_VERSION }} + # - name: Create GitHub release + # env: + # GH_TOKEN: ${{ github.token }} + # run: gh release create ${{ env.RG_VERSION }} build-release: name: build-release needs: ['create-release'] @@ -84,13 +84,24 @@ jobs: echo "cargo command is: ${{ env.CARGO }}" echo "target flag is: ${{ env.TARGET_FLAGS }}" echo "target dir is: ${{ env.TARGET_DIR }}" + + - name: Install GLib development package + run: | + sudo apt-get update + sudo apt-get install -y libglib2.0-dev + export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig:$PKG_CONFIG_PATH - name: Build release binary - run: ${{ env.CARGO }} build --verbose --release --features ${{ env.TARGET_FLAGS }} + run: | + ${{ env.CARGO }} build --verbose --release --target ${{ matrix.target }} + + - name: Show contents of the target directory + if: matrix.build == 'win-msvc' || matrix.build == 'win-gnu' || matrix.build == 'win32-msvc' + run: tree - name: Strip release binary (linux, macos and macos-arm) if: matrix.build == 'linux' || matrix.os == 'macos' - run: strip "target/${{ matrix.target }}/release/rg" + run: strip "target/${{ matrix.target }}/release/testkit" - name: Strip release binary (arm) if: matrix.build == 'linux-arm' @@ -99,20 +110,20 @@ jobs: "$PWD/target:/target:Z" \ rustembedded/cross:arm-unknown-linux-gnueabihf \ arm-linux-gnueabihf-strip \ - /target/arm-unknown-linux-gnueabihf/release/rg + /target/arm-unknown-linux-gnueabihf/release/testkit - name: Build archive shell: bash run: | - staging="ripgrep-${{ needs.create-release.outputs.rg_version }}-${{ matrix.target }}" + staging="testkit-${{ needs.create-release.outputs.rg_version }}-${{ matrix.target }}" mkdir -p "$staging" if [ "${{ matrix.os }}" = "windows-latest" ]; then - cp "target/${{ matrix.target }}/release/rg.exe" "$staging/" + cp "target/${{ matrix.target }}/release/testkit.exe" "$staging/" 7z a "$staging.zip" "$staging" certutil -hashfile "$staging.zip" SHA256 > "$staging.zip.sha256" echo "ASSET=$staging.zip" >> $GITHUB_ENV echo "ASSET_SUM=$staging.zip.sha256" >> $GITHUB_ENV else - cp "target/${{ matrix.target }}/release/rg" "$staging/" + cp "target/${{ matrix.target }}/release/testkit" "$staging/" tar czf "$staging.tar.gz" "$staging" shasum -a 256 "$staging.tar.gz" > "$staging.tar.gz.sha256" echo "ASSET=$staging.tar.gz" >> $GITHUB_ENV diff --git a/ci/ubuntu-install-packages b/ci/ubuntu-install-packages new file mode 100644 index 0000000..ca9e6a6 --- /dev/null +++ b/ci/ubuntu-install-packages @@ -0,0 +1,4 @@ +#!/bin/sh + +apt-get update +apt-get install libglib2.0-dev \ No newline at end of file