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
59 changes: 31 additions & 28 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@ jobs:
env:
IMAGE_NAME: git-iris-test
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
with:
fetch-depth: 0
- uses: docker/setup-buildx-action@v3
- uses: docker/setup-buildx-action@v4
- name: Build Docker image
working-directory: ./docker
run: ./build.sh $IMAGE_NAME
run: ./build.sh "$IMAGE_NAME"
- name: Test Docker image
working-directory: ./docker
run: CI=true ./test-image.sh $IMAGE_NAME
run: CI=true ./test-image.sh "$IMAGE_NAME"

# โ”€โ”€ Build Artifacts โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
build-artifacts:
Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:
target: aarch64-apple-darwin
binary_name: git-iris
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
with:
fetch-depth: 0
- uses: dtolnay/rust-toolchain@stable
Expand All @@ -88,7 +88,7 @@ jobs:
cache-on-failure: true
- name: Build release binary
run: cargo build --verbose --locked --release --target ${{ matrix.target }}
- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v7
with:
name: git-iris-${{ matrix.build }}
path: ./target/${{ matrix.target }}/release/${{ matrix.binary_name }}
Expand All @@ -113,12 +113,12 @@ jobs:
outputs:
version: ${{ steps.get_version.outputs.VERSION }}
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Get version
id: get_version
run: echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_OUTPUT
run: echo "VERSION=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
Expand All @@ -127,8 +127,8 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y gcc-aarch64-linux-gnu
echo "CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
echo "CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc" >> "$GITHUB_ENV"
echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> "$GITHUB_ENV"
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
Expand All @@ -138,7 +138,7 @@ jobs:
env:
RUSTFLAGS: ${{ matrix.rust_flags }}
run: cargo deb --target ${{ matrix.target }}
- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v7
with:
name: git-iris-deb-${{ matrix.arch_suffix }}
path: ./target/${{ matrix.target }}/debian/git-iris_${{ steps.get_version.outputs.VERSION }}-1_${{ matrix.arch_suffix }}.deb
Expand All @@ -154,15 +154,15 @@ jobs:
env:
RUSTFLAGS: ${{ matrix.rust_flags }}
run: cargo generate-rpm --target ${{ matrix.target }}
- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v7
with:
name: git-iris-rpm-${{ matrix.arch_suffix }}
path: ./target/${{ matrix.target }}/generate-rpm/git-iris-${{ steps.get_version.outputs.VERSION }}-1.${{ matrix.rpm_arch }}.rpm
if-no-files-found: error
retention-days: 1
- name: Upload man page
if: matrix.build == 'linux-amd64'
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: git-iris-man
path: ./git-iris.1
Expand Down Expand Up @@ -201,14 +201,15 @@ jobs:
permissions:
contents: write
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Download all artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
path: ./artifacts
pattern: git-iris-*
merge-multiple: false
- name: Prepare release assets
run: |
mkdir -p release-assets
Expand All @@ -227,15 +228,15 @@ jobs:
id: prev_tag
run: |
PREVIOUS_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "")
echo "tag=$PREVIOUS_TAG" >> $GITHUB_OUTPUT
echo "tag=$PREVIOUS_TAG" >> "$GITHUB_OUTPUT"
- name: Prepare git-iris binary
run: |
chmod +x ./artifacts/git-iris-linux-amd64/git-iris
./artifacts/git-iris-linux-amd64/git-iris --version
- name: Download release notes from release workflow
id: download_notes
if: ${{ inputs.release_run_id != '' }}
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
name: release-notes
run-id: ${{ inputs.release_run_id }}
Expand All @@ -250,7 +251,7 @@ jobs:
to: ${{ github.ref_name }}
version-name: ${{ github.ref_name }}
provider: anthropic
model: claude-opus-4-5-20251101
model: claude-opus-5
api-key: ${{ secrets.ANTHROPIC_API_KEY }}
output-file: RELEASE_NOTES.md
binary-path: ./artifacts/git-iris-linux-amd64/git-iris
Expand All @@ -261,7 +262,7 @@ jobs:
echo "" >> RELEASE_NOTES.md
echo "See [commit history](https://github.com/hyperb1iss/git-iris/commits/${{ github.ref_name }}) for changes." >> RELEASE_NOTES.md
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
uses: softprops/action-gh-release@v3
with:
name: Release ${{ github.ref_name }}
draft: false
Expand All @@ -278,7 +279,7 @@ jobs:
permissions:
contents: write
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Update major version tag
Expand All @@ -297,7 +298,7 @@ jobs:
needs: create-release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
with:
repository: hyperb1iss/homebrew-tap
token: ${{ secrets.HOMEBREW_TAP_TOKEN }}
Expand All @@ -306,17 +307,19 @@ jobs:
id: sha
run: |
VERSION="${GITHUB_REF_NAME#v}"
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "version=$VERSION" >> "$GITHUB_OUTPUT"

MACOS_ARM64=$(curl -fsSL "https://github.com/hyperb1iss/git-iris/releases/download/${GITHUB_REF_NAME}/git-iris-macos-arm64" | shasum -a 256 | cut -d' ' -f1)
LINUX_ARM64=$(curl -fsSL "https://github.com/hyperb1iss/git-iris/releases/download/${GITHUB_REF_NAME}/git-iris-linux-arm64" | shasum -a 256 | cut -d' ' -f1)
LINUX_AMD64=$(curl -fsSL "https://github.com/hyperb1iss/git-iris/releases/download/${GITHUB_REF_NAME}/git-iris-linux-amd64" | shasum -a 256 | cut -d' ' -f1)
SOURCE=$(curl -fsSL "https://github.com/hyperb1iss/git-iris/archive/refs/tags/${GITHUB_REF_NAME}.tar.gz" | shasum -a 256 | cut -d' ' -f1)

echo "macos_arm64=$MACOS_ARM64" >> $GITHUB_OUTPUT
echo "linux_arm64=$LINUX_ARM64" >> $GITHUB_OUTPUT
echo "linux_amd64=$LINUX_AMD64" >> $GITHUB_OUTPUT
echo "source=$SOURCE" >> $GITHUB_OUTPUT
{
echo "macos_arm64=$MACOS_ARM64"
echo "linux_arm64=$LINUX_ARM64"
echo "linux_amd64=$LINUX_AMD64"
echo "source=$SOURCE"
} >> "$GITHUB_OUTPUT"
- name: Generate formula
run: |
cat > homebrew-tap/Formula/git-iris.rb << 'EOF'
Expand Down Expand Up @@ -381,7 +384,7 @@ jobs:
needs: create-release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- name: Generate PKGBUILD
run: |
VERSION="${GITHUB_REF_NAME#v}"
Expand Down Expand Up @@ -412,7 +415,7 @@ jobs:
}
EOF
- name: Publish to AUR
uses: KSXGitHub/github-actions-deploy-aur@v4.1.2
uses: KSXGitHub/github-actions-deploy-aur@v4.2.0
with:
pkgname: git-iris-bin
pkgbuild: ./PKGBUILD
Expand Down
70 changes: 35 additions & 35 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:

steps:
- name: "๐Ÿ“ฅ Checkout"
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -104,8 +104,8 @@ jobs:
exit 1
fi

echo "current=$CURRENT" >> $GITHUB_OUTPUT
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "current=$CURRENT" >> "$GITHUB_OUTPUT"
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "๐Ÿš€ Releasing: $CURRENT โ†’ $VERSION"

- name: "๐Ÿ“ Update Cargo.toml version"
Expand Down Expand Up @@ -133,7 +133,7 @@ jobs:
output-file: CHANGELOG.md
update-file: "true"
provider: anthropic
model: claude-opus-4-5-20251101
model: claude-opus-5
api-key: ${{ secrets.ANTHROPIC_API_KEY }}
binary-path: ./target/release/git-iris

Expand All @@ -148,13 +148,13 @@ jobs:
version-name: ${{ steps.version.outputs.version }}
output-file: RELEASE_NOTES.md
provider: anthropic
model: claude-opus-4-5-20251101
model: claude-opus-5
api-key: ${{ secrets.ANTHROPIC_API_KEY }}
binary-path: ./target/release/git-iris

- name: "๐Ÿ“ค Upload release notes artifact"
if: ${{ !inputs.dry_run }}
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: release-notes
path: RELEASE_NOTES.md
Expand Down Expand Up @@ -184,32 +184,32 @@ jobs:

- name: "๐Ÿ“Š Summary"
run: |
echo "## Release ${{ inputs.dry_run && '[DRY RUN] ' || '' }}v${{ steps.version.outputs.version }}" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY

if [[ "${{ inputs.dry_run }}" == "true" ]]; then
echo "โœ… Build and tests passed" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**Ready to release.** Run again without dry-run to publish." >> $GITHUB_STEP_SUMMARY
else
echo "โœ… Version bumped: ${{ steps.version.outputs.current }} โ†’ ${{ steps.version.outputs.version }}" >> $GITHUB_STEP_SUMMARY
echo "โœ… Tag created and pushed: v${{ steps.version.outputs.version }}" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "๐Ÿš€ **CI/CD pipeline triggered!** The following will happen automatically:" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "- Build release binaries (Linux x64/ARM64, macOS ARM64, Windows)" >> $GITHUB_STEP_SUMMARY
echo "- Build .deb and .rpm packages" >> $GITHUB_STEP_SUMMARY
echo "- Publish Docker image to Docker Hub" >> $GITHUB_STEP_SUMMARY
echo "- Publish to crates.io" >> $GITHUB_STEP_SUMMARY
echo "- Create GitHub Release with release notes" >> $GITHUB_STEP_SUMMARY
echo "- Update v1 action tag" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "๐Ÿ“ฆ [View CI/CD progress](https://github.com/${{ github.repository }}/actions)" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "---" >> $GITHUB_STEP_SUMMARY
echo "### ๐Ÿ“ Release Notes Preview" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
cat << 'EOF' >> $GITHUB_STEP_SUMMARY
${{ steps.release_notes.outputs.content }}
EOF
fi
{
echo "## Release ${{ inputs.dry_run && '[DRY RUN] ' || '' }}v${{ steps.version.outputs.version }}"
echo ""

if [[ "${{ inputs.dry_run }}" == "true" ]]; then
echo "โœ… Build and tests passed"
echo ""
echo "**Ready to release.** Run again without dry-run to publish."
else
echo "โœ… Version bumped: ${{ steps.version.outputs.current }} โ†’ ${{ steps.version.outputs.version }}"
echo "โœ… Tag created and pushed: v${{ steps.version.outputs.version }}"
echo ""
echo "๐Ÿš€ **CI/CD pipeline triggered!** The following will happen automatically:"
echo ""
echo "- Build release binaries (Linux x64/ARM64, macOS ARM64, Windows)"
echo "- Build .deb and .rpm packages"
echo "- Publish Docker image to Docker Hub"
echo "- Publish to crates.io"
echo "- Create GitHub Release with release notes"
echo "- Update v1 action tag"
echo ""
echo "๐Ÿ“ฆ [View CI/CD progress](https://github.com/${{ github.repository }}/actions)"
echo ""
echo "---"
echo "### ๐Ÿ“ Release Notes Preview"
echo ""
cat RELEASE_NOTES.md
fi
} >> "$GITHUB_STEP_SUMMARY"
Loading