diff --git a/.github/workflows/nifi_migrate_release.yaml b/.github/workflows/nifi_migrate_release.yaml index fbabe36..f2a130d 100644 --- a/.github/workflows/nifi_migrate_release.yaml +++ b/.github/workflows/nifi_migrate_release.yaml @@ -6,7 +6,7 @@ name: Release nifi-migrate on: push: tags: - - "nifi-migrate-[0-9]+.[0-9]+.[0-9]+**" + - "rel/nifi-migrate-[0-9]+.[0-9]+.[0-9]+**" env: RUST_VERSION: 1.87.0 @@ -32,6 +32,7 @@ jobs: - { target: aarch64-unknown-linux-gnu, os: ubuntu-24.04-arm } - { target: x86_64-unknown-linux-gnu, os: ubuntu-latest } - { target: aarch64-apple-darwin, os: macos-latest } + - { target: x86_64-pc-windows-msvc, os: windows-latest } runs-on: ${{ matrix.targets.os }} steps: - name: Checkout @@ -49,13 +50,31 @@ jobs: TARGET: ${{ matrix.targets.target }} run: cargo build --target "$TARGET" --release --package nifi-migrate - - name: Rename Binary + - name: Rename Binary (Unix) + if: runner.os != 'Windows' env: TARGET: ${{ matrix.targets.target }} run: mv "target/$TARGET/release/nifi-migrate" "nifi-migrate-$TARGET" + - name: Rename Binary (Windows) + if: runner.os == 'Windows' + env: + TARGET: ${{ matrix.targets.target }} + run: mv "target/$TARGET/release/nifi-migrate.exe" "nifi-migrate-$TARGET.exe" + - name: Upload Artifact to Release + uses: softprops/action-gh-release@72f2c25fcb47643c292f7107632f7a47c1df5cd8 # v2.3.2 + with: + draft: true + files: nifi-migrate-${{ matrix.targets.target }}${{ runner.os == 'Windows' && '.exe' || '' }} + + publish-release: + name: Publish Release + needs: + - build + runs-on: ubuntu-latest + steps: + - name: Publish Release uses: softprops/action-gh-release@72f2c25fcb47643c292f7107632f7a47c1df5cd8 # v2.3.2 with: draft: false - files: nifi-migrate-${{ matrix.targets.target }} diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..3004ee1 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,34 @@ + + +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## Unreleased + +### Added + +- Initial release of nifi-migrate tool ([#1], [#2], [#3]) +- JoltTransformJSON processor migration ([NIFI-12554](https://issues.apache.org/jira/browse/NIFI-12554)) + - Type: `org.apache.nifi.processors.standard.JoltTransformJSON` → `org.apache.nifi.processors.jolt.JoltTransformJSON` + - Bundle: `nifi-standard-nar` → `nifi-jolt-nar` + - Property name migrations (5 properties) +- JoltTransformRecord processor migration ([NIFI-12554](https://issues.apache.org/jira/browse/NIFI-12554)) + - Type: `org.apache.nifi.processors.jolt.record.JoltTransformRecord` → `org.apache.nifi.processors.jolt.JoltTransformRecord` + - Bundle: `nifi-jolt-record-nar` → `nifi-jolt-nar` + - Property name migrations (5 properties) +- Distributed Cache Controller Services migration ([NIFI-13596](https://issues.apache.org/jira/browse/NIFI-13596)) + - `DistributedMapCacheClientService` → `MapCacheClientService` + - `DistributedSetCacheClientService` → `SetCacheClientService` + - `DistributedMapCacheServer` → `MapCacheServer` + - `DistributedSetCacheServer` → `SetCacheServer` + +[#1]: https://github.com/stackabletech/nifi-migrate/pull/1 +[#2]: https://github.com/stackabletech/nifi-migrate/pull/2 +[#3]: https://github.com/stackabletech/nifi-migrate/pull/3 diff --git a/README.md b/README.md index 6c5f1c9..f2deb6f 100644 --- a/README.md +++ b/README.md @@ -101,6 +101,74 @@ To add a new migration rule: } ``` +## Releases + +### How to Create a Release + +1. **Update version numbers** in `Cargo.toml`: + + ```toml + [package] + version = "0.2.0" # Update to new version + ``` + +2. **Update CHANGELOG.md**: + - Move items from `[Unreleased]` section to a new version section + - Add the release date + - Update the comparison links at the bottom + - Example: + + ```markdown + ## [0.2.0] - 2025-10-14 + + ### Added + - New migration rule for XYZ + + [Unreleased]: https://github.com/stackabletech/nifi-migrate/compare/rel/nifi-migrate-0.2.0...HEAD + [0.2.0]: https://github.com/stackabletech/nifi-migrate/releases/tag/rel/nifi-migrate-0.2.0 + ``` + +3. **Create a pull request** with these changes: + - Title: `Prepare release 0.2.0` + - Ensure all CI checks pass + - Get approval and merge to `main` + +4. **Create and push the release tag**: + + ```bash + git checkout main + git pull origin main + git tag rel/nifi-migrate-0.2.0 + git push origin rel/nifi-migrate-0.2.0 + ``` + +5. **Automated release process**: + - GitHub Actions will automatically: + - Create a draft release + - Build binaries for 4 platforms: + - `nifi-migrate-aarch64-unknown-linux-gnu` (Linux ARM64) + - `nifi-migrate-x86_64-unknown-linux-gnu` (Linux x86_64) + - `nifi-migrate-aarch64-apple-darwin` (macOS ARM64) + - `nifi-migrate-x86_64-pc-windows-msvc.exe` (Windows x86_64) + - Upload all binaries to the release + - Automatically publish the release (no manual step needed) + +6. **Verify the release**: + - Check + - Download and test binaries on different platforms + - Update documentation if needed + +### Release Checklist + +- [ ] Version bumped in `Cargo.toml` +- [ ] `CHANGELOG.md` updated with new version and release date +- [ ] All migration rules documented in README's "Supported Migrations" section +- [ ] All tests passing locally (`just all`) +- [ ] PR created, reviewed, and merged +- [ ] Tag created with format `rel/nifi-migrate-X.Y.Z` +- [ ] Tag pushed to origin +- [ ] GitHub release automatically published with all 4 binaries + ## License Licensed under the Apache License, Version 2.0. See [LICENSE](LICENSE) for details.