-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: rename binary to s2 when releasing (#76)
- Loading branch information
1 parent
99998f5
commit 753edbd
Showing
1 changed file
with
7 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,14 +11,14 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
include: | ||
- os: ubuntu-latest | ||
- os: ubuntu-24.04 | ||
target: aarch64-unknown-linux-gnu | ||
deps: | | ||
sudo apt-get update | ||
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu | ||
env: | ||
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc | ||
- os: ubuntu-20.04 | ||
- os: ubuntu-24.04 | ||
target: x86_64-unknown-linux-gnu | ||
- os: macos-latest | ||
target: x86_64-apple-darwin | ||
|
@@ -46,26 +46,15 @@ jobs: | |
- name: Set CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER | ||
if: matrix.target == 'aarch64-unknown-linux-gnu' | ||
run: echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV | ||
- run: | | ||
git config --global --add url."https://${{ secrets.GH_TOKEN }}:[email protected]/".insteadOf "[email protected]:" | ||
git config --global --add url."https://${{ secrets.GH_TOKEN }}:x-oauth-basic@github".insteadOf https://github | ||
git config --global --add url."https://${{ secrets.GH_TOKEN }}:x-oauth-basic@github".insteadOf ssh://git@github | ||
- name: rename the package to s2 | ||
run: sed -i.bak -E '/^\[package\]/,/^\[.*\]/ s/^name *= *"[^"]*"/name = "s2"/' Cargo.toml | ||
- name: Build | ||
run: cargo build --release --target ${{ matrix.target }} | ||
- name: Create pem and certificate.der files | ||
if: matrix.os == 'macos-latest' | ||
run: | | ||
echo "${{ secrets.MACOS_PEM }}" | base64 -d -o macos.pem | ||
echo "${{ secrets.MACOS_CERTIFICATE_DER }}" | base64 -d -o certificate.der | ||
- name: rename binary streamstore-cli -> s2 | ||
shell: bash | ||
run: | | ||
if [ "${{ matrix.os }}" = "windows-latest" ]; | ||
then | ||
mv target/${{ matrix.target }}/release/streamstore-cli.exe target/${{ matrix.target }}/release/s2.exe | ||
else | ||
mv target/${{ matrix.target }}/release/streamstore-cli target/${{ matrix.target }}/release/s2 | ||
fi | ||
echo "${{ secrets.MACOS_CERTIFICATE_DER }}" | base64 -d -o certificate.der | ||
- name: Sign macos binary | ||
if: matrix.os == 'macos-latest' | ||
uses: indygreg/apple-code-sign-action@v1 | ||
|
@@ -107,7 +96,7 @@ jobs: | |
|
||
create_release: | ||
needs: build_binaries | ||
runs-on: ubuntu-20.04 | ||
runs-on: ubuntu-24.04 | ||
if: github.event_name != 'workflow_dispatch' | ||
permissions: | ||
contents: write | ||
|
@@ -141,7 +130,7 @@ jobs: | |
|
||
update_homebrew: | ||
needs: [create_release, build_binaries] | ||
runs-on: ubuntu-20.04 | ||
runs-on: ubuntu-24.04 | ||
if: github.event_name != 'workflow_dispatch' | ||
steps: | ||
- name: checkout | ||
|