Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: release CI #11

Merged
merged 11 commits into from
Nov 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 19 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: release
on:
push:
tags: ["[0-9]+.[0-9]+.[0-9]+*"]
tags: ["[0-9]+.[0-9]+.[0-9]+*"]
workflow_dispatch:
jobs:
build_binaries:
Expand All @@ -13,6 +13,11 @@ jobs:
include:
- os: ubuntu-latest
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-latest
target: x86_64-unknown-linux-gnu
- os: macos-latest
Expand All @@ -29,17 +34,24 @@ jobs:
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
rustflags: ""
- uses: taiki-e/install-action@v2
with:
tool: cross
target: ${{ matrix.target }}
- name: Install dependencies
if: matrix.deps != ''
run: ${{ matrix.deps }}
shell: bash
- name: install protoc
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- 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
git config --global --add url."https://${{ secrets.GH_TOKEN }}:x-oauth-basic@github".insteadOf ssh://git@github
- name: Build
run: cross build --release --target ${{ matrix.target }}
run: cargo build --release --target ${{ matrix.target }}
- name: Prepare artifacts
shell: bash
run: |
Expand Down Expand Up @@ -76,7 +88,7 @@ jobs:
field: package.version
- name: download artifacts
uses: actions/download-artifact@v4
- name: create Release
- name: create release
uses: softprops/action-gh-release@v2
with:
files: |
Expand Down