Skip to content

Commit

Permalink
CI: Build releases
Browse files Browse the repository at this point in the history
Can build releases again now that arm isnt always built
Signed-off-by: Luis Garcia <[email protected]>

Signed-off-by: Luis Garcia <[email protected]>
  • Loading branch information
luigi311 committed Oct 30, 2024
1 parent 900c665 commit 3a50ee6
Showing 1 changed file with 6 additions and 30 deletions.
36 changes: 6 additions & 30 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,27 +95,20 @@ jobs:
shell: bash
env:
RUSTFLAGS: "-Clink-arg=-Wl,--allow-multiple-definition"
run: |
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
cargo build -p tanoshi-cli --release
echo "build_dir=release" >> $GITHUB_ENV
else
cargo build -p tanoshi-cli
echo "build_dir=debug" >> $GITHUB_ENV
fi
run: cargo build -p tanoshi-cli --release

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: tanoshi-cli
path: ${{ github.workspace }}/target/${{ env.build_dir }}/tanoshi-cli
path: ${{ github.workspace }}/target/release/tanoshi-cli

- name: Upload binaries to GitHub Releases
if: startsWith(github.ref, 'refs/tags/')
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/${{ env.build_dir }}/tanoshi-cli
file: target/release/tanoshi-cli
asset_name: tanoshi-cli
tag: ${{ github.ref }}

Expand All @@ -129,13 +122,7 @@ jobs:
- uses: Swatinem/rust-cache@v2

- name: Build tanoshi-web
shell: bash
run: |
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
cd crates/tanoshi-web && trunk build --release
else
cd crates/tanoshi-web && trunk build
fi
run: cd crates/tanoshi-web && trunk build --release

- name: Upload tanoshi-web
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -233,11 +220,7 @@ jobs:
RUSTFLAGS: "-Clink-arg=-Wl,--allow-multiple-definition"
run: |
cd crates/tanoshi-tauri
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
cargo tauri build
else
cargo tauri build --debug
fi
cargo tauri build
if: matrix.arch != 'aarch64' || matrix.include_arm64

- name: Move files
Expand Down Expand Up @@ -327,14 +310,7 @@ jobs:
shell: bash
env:
RUSTFLAGS: "-Clink-arg=-Wl,--allow-multiple-definition"
run: |
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
cargo build -p tanoshi --release
echo "build_dir=release" >> $GITHUB_ENV
else
cargo build -p tanoshi
echo "build_dir=debug" >> $GITHUB_ENV
fi
run: cargo build -p tanoshi --release
if: matrix.arch != 'aarch64' || matrix.include_arm64

- name: Upload dist
Expand Down

0 comments on commit 3a50ee6

Please sign in to comment.