Skip to content
Merged
Show file tree
Hide file tree
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
34 changes: 17 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ jobs:
tag_prefix: "v"
major_pattern: "(MAJOR|BREAKING CHANGE|!:)"
minor_pattern: "(MINOR|feat:|feature:)"
patch_pattern: "(PATCH|fix:|patch:|hotfix:)"
version_format: "${major}.${minor}.${patch}"
change_path: "src"
namespace: ""
Expand Down Expand Up @@ -177,22 +176,23 @@ jobs:
key: ${{ matrix.target }}

- name: Build for ${{ matrix.target }}
run: |
cargo build --release --target ${{ matrix.target }}
if [[ "${{ matrix.target }}" == *"windows"* ]]; then
mv target/${{ matrix.target }}/release/repos.exe repos-${{ matrix.target }}.exe
else
mv target/${{ matrix.target }}/release/repos repos-${{ matrix.target }}
fi

- name: Strip binary (Unix only)
if: matrix.suffix == ''
run: |
if [[ "${{ runner.os }}" == "macOS" ]]; then
strip -x repos-${{ matrix.target }}
else
strip repos-${{ matrix.target }}
fi
run: cargo build --release --target ${{ matrix.target }}

- name: Rename Windows binary
if: contains(matrix.target, 'windows')
run: mv target/${{ matrix.target }}/release/repos.exe repos-${{ matrix.target }}.exe

- name: Rename Unix binary
if: "!contains(matrix.target, 'windows')"
run: mv target/${{ matrix.target }}/release/repos repos-${{ matrix.target }}

- name: Strip binary (macOS)
if: "!contains(matrix.target, 'windows') && runner.os == 'macOS'"
run: strip -x repos-${{ matrix.target }}

- name: Strip binary (Linux)
if: "!contains(matrix.target, 'windows') && runner.os == 'Linux'"
run: strip repos-${{ matrix.target }}

- name: Create archive
shell: bash
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ RUN apk add --no-cache \
gcc

# Copy dependency files first for better caching
COPY Cargo.toml Cargo.lock ./
COPY Cargo.toml ./
COPY Cargo.loc[k] ./

# Create dummy source to build dependencies
RUN mkdir src && echo "fn main() {}" > src/main.rs && \
Expand Down