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
31 changes: 31 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: CI

on:
push:
branches: [main]
pull_request:

permissions:
contents: read

jobs:
quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- run: cargo fmt --all --check
- run: cargo clippy --all-targets --locked -- -D warnings

test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
- run: cargo test --all-targets --locked
71 changes: 71 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Release

on:
push:
tags: ['v*']

permissions:
contents: write

jobs:
create-release:
runs-on: ubuntu-latest
steps:
- name: Create GitHub release
env:
GH_TOKEN: ${{ github.token }}
run: gh release view "$GITHUB_REF_NAME" --repo "$GITHUB_REPOSITORY" || gh release create "$GITHUB_REF_NAME" --repo "$GITHUB_REPOSITORY" --generate-notes

build:
needs: create-release
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
suffix: linux-x64
archive: tar
- os: windows-latest
target: x86_64-pc-windows-msvc
suffix: windows-x64
archive: zip
- os: macos-latest
target: x86_64-apple-darwin
suffix: macos-x64
archive: tar
- os: macos-latest
target: aarch64-apple-darwin
suffix: macos-arm64
archive: tar
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- run: cargo build --release --locked --target ${{ matrix.target }}

- name: Package Unix binary
if: matrix.archive == 'tar'
shell: bash
run: |
mkdir dist
cp "target/${{ matrix.target }}/release/unity-crop" dist/
tar -C dist -czf "unity-crop-${GITHUB_REF_NAME}-${{ matrix.suffix }}.tar.gz" unity-crop

- name: Package Windows binary
if: matrix.archive == 'zip'
shell: pwsh
run: |
New-Item -ItemType Directory -Path dist
Copy-Item "target/${{ matrix.target }}/release/unity-crop.exe" dist/
Compress-Archive -Path dist/unity-crop.exe -DestinationPath "unity-crop-$env:GITHUB_REF_NAME-${{ matrix.suffix }}.zip"

- name: Upload release asset
shell: bash
env:
GH_TOKEN: ${{ github.token }}
run: |
asset=$(find . -maxdepth 1 -type f -name "unity-crop-${GITHUB_REF_NAME}-${{ matrix.suffix }}.*" -print -quit)
gh release upload "$GITHUB_REF_NAME" "$asset" --repo "$GITHUB_REPOSITORY" --clobber
30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Changelog

All notable changes to Unity Crop are documented in this file.

## [Unreleased]

## [3.0.0] - 2026-08-25

### Added

- command-line arguments for input, output, recursion, thread count, and logging;
- recursive project scanning with Unity-specific default exclusions;
- multithreaded sprite-sheet processing;
- repeatable include and exclude glob patterns;
- path and filename templates with documented placeholders;
- collision policies: rename, skip, overwrite, and error;
- dry-run and fail-fast modes;
- coordinate validation, filename sanitization, and structured summaries;
- English and Russian documentation;
- MIT license, automated tests, CI, and release workflows.

### Changed

- decode each source PNG once instead of once per sprite;
- continue processing other inputs after a malformed sheet unless `--fail-fast` is used;
- preserve relative project directories in the default output layout;
- rename the produced executable to `unity-crop`.

[Unreleased]: https://github.com/Senya01/UnityCrop/compare/v3.0.0...HEAD
[3.0.0]: https://github.com/Senya01/UnityCrop/compare/2.0.0...v3.0.0
Loading