Version 2.4.0 #17
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release Packages | |
on: | |
release: | |
types: [ published ] | |
jobs: | |
build_tag: | |
name: "Build Tag Name" | |
runs-on: ubuntu-latest | |
timeout-minutes: 1 | |
outputs: | |
release_version: ${{ steps.ref.outputs.version }} | |
steps: | |
- name: " Build Tag" | |
id: ref | |
shell: bash | |
run: | | |
ref="${{ github.ref }}"; | |
ref="${ref//refs\/heads\//}"; | |
ref="${ref//refs\/tags\//}"; | |
ref="${ref//master/dev}"; | |
echo "$ref"; | |
echo "version=$ref" >> "$GITHUB_OUTPUT" | |
build-deb: | |
name: "Release ${{ matrix.platform.name }}" | |
strategy: | |
matrix: | |
platform: | |
- name: ubuntu-20.04_arm64 | |
target: aarch64-unknown-linux-gnu | |
image: ubuntu:20.04 | |
build-args: "--features zlib-ng-compat" | |
pkg-args: --no-strip | |
- name: ubuntu-20.04_amd64 | |
target: x86_64-unknown-linux-gnu | |
image: ubuntu:20.04 | |
- name: ubuntu-22.04_arm64 | |
target: aarch64-unknown-linux-gnu | |
image: ubuntu:22.04 | |
build-args: "--features zlib-ng-compat" | |
pkg-args: --no-strip | |
- name: ubuntu-22.04_amd64 | |
target: x86_64-unknown-linux-gnu | |
image: ubuntu:22.04 | |
- name: ubuntu-24.04_arm64 | |
target: aarch64-unknown-linux-gnu | |
image: ubuntu:24.04 | |
build-args: "--features zlib-ng-compat" | |
pkg-args: --no-strip | |
- name: ubuntu-24.04_amd64 | |
target: x86_64-unknown-linux-gnu | |
image: ubuntu:24.04 | |
- name: debian-10_arm64 | |
target: aarch64-unknown-linux-gnu | |
image: debian:10-slim | |
build-args: "--features zlib-ng-compat" | |
pkg-args: --no-strip | |
- name: debian-10_amd64 | |
target: x86_64-unknown-linux-gnu | |
image: debian:10-slim | |
- name: debian-11_arm64 | |
target: aarch64-unknown-linux-gnu | |
image: debian:11-slim | |
build-args: "--features zlib-ng-compat" | |
pkg-args: --no-strip | |
- name: debian-11_amd64 | |
target: x86_64-unknown-linux-gnu | |
image: debian:11-slim | |
- name: debian-12_arm64 | |
target: aarch64-unknown-linux-gnu | |
image: debian:12-slim | |
build-args: "--features zlib-ng-compat" | |
pkg-args: --no-strip | |
- name: debian-12_amd64 | |
target: x86_64-unknown-linux-gnu | |
image: debian:12-slim | |
- name: debian-sid_arm64 | |
target: aarch64-unknown-linux-gnu | |
image: debian:sid-slim | |
build-args: "--features zlib-ng-compat" | |
pkg-args: --no-strip | |
- name: debian-sid_amd64 | |
target: x86_64-unknown-linux-gnu | |
image: debian:sid-slim | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
needs: [ build_tag ] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
- uses: baptiste0928/cargo-install@v2 | |
with: | |
crate: cargo-deb | |
- name: Build | |
uses: houseabsolute/actions-rust-cross@v0 | |
with: | |
command: build | |
target: ${{ matrix.platform.target }} | |
toolchain: stable | |
args: "--release ${{ matrix.platform.build-args }}" | |
- name: "Build Deb" | |
run: $HOME/.cargo/bin/cargo +stable deb ${{ matrix.platform.pkg-args }} --no-build --target ${{ matrix.platform.target }} --output "target/git-interactive-rebase-tool-${{ needs.build_tag.outputs.release_version }}-${{ matrix.platform.name }}.deb" | |
- name: "Upload Release" | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
target/*.deb | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
build-rpm: | |
name: "Release ${{ matrix.platform.name }}" | |
strategy: | |
matrix: | |
platform: | |
- name: fedora-39_arm64 | |
target: aarch64-unknown-linux-gnu | |
image: fedora:39 | |
build-args: "--features zlib-ng-compat" | |
- name: fedora-39_amd64 | |
target: x86_64-unknown-linux-gnu | |
image: fedora:39 | |
- name: fedora-40_arm64 | |
target: aarch64-unknown-linux-gnu | |
image: fedora:40 | |
build-args: "--features zlib-ng-compat" | |
- name: fedora-40_amd64 | |
target: x86_64-unknown-linux-gnu | |
image: fedora:40 | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
needs: [ build_tag ] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
- uses: baptiste0928/cargo-install@v2 | |
with: | |
crate: cargo-generate-rpm | |
- name: Build | |
uses: houseabsolute/actions-rust-cross@v0 | |
with: | |
command: build | |
target: ${{ matrix.platform.target }} | |
toolchain: stable | |
args: "--release ${{ matrix.platform.build-args }}" | |
- name: "Build RPM" | |
run: $HOME/.cargo/bin/cargo +stable generate-rpm --target ${{ matrix.platform.target }} --output "target/git-interactive-rebase-tool-${{ needs.build_tag.outputs.release_version }}-${{ matrix.platform.name }}.rpm" | |
- name: "Upload Release" | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
target/*.rpm | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
linux-other: | |
name: "Release ${{ matrix.platform.name }}" | |
continue-on-error: true | |
strategy: | |
matrix: | |
platform: | |
# Alpine | |
- name: alpine_arm64 | |
target: aarch64-unknown-linux-gnu | |
build-args: "--features zlib-ng-compat" | |
- name: alpine_amd64 | |
target: x86_64-unknown-linux-gnu | |
# Arch | |
- name: arch_arm64 | |
target: aarch64-unknown-linux-gnu | |
build-args: "--features zlib-ng-compat" | |
- name: arch_amd64 | |
target: x86_64-unknown-linux-gnu | |
# Raspberry PI | |
- name: pi0-1_arm | |
target: arm-unknown-linux-gnueabihf | |
- name: pi2-4_armv7 | |
target: armv7-unknown-linux-gnueabihf | |
build-args: "--features zlib-ng-compat" | |
- name: pi5_arm64 | |
target: aarch64-unknown-linux-gnu | |
build-args: "--features zlib-ng-compat" | |
needs: [ build_tag ] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Build | |
uses: houseabsolute/actions-rust-cross@v0 | |
with: | |
command: build | |
target: ${{ matrix.platform.target }} | |
toolchain: stable | |
args: "--release ${{ matrix.platform.build-args }}" | |
- name: "Copy" | |
run: cp target/${{ matrix.platform.target }}/release/interactive-rebase-tool target/release/git-interactive-rebase-tool-${{ needs.build_tag.outputs.release_version }}-${{ matrix.platform.name }} | |
- name: "Upload Release" | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: target/release/git-interactive-rebase-tool-${{ needs.build_tag.outputs.release_version }}-${{ matrix.platform.name }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
build-macos: | |
name: "Release macOS-${{ matrix.platform.macos }}_${{ matrix.platform.name }}" | |
strategy: | |
matrix: | |
platform: | |
- name: macos-12_arm | |
target: aarch64-apple-darwin | |
macos: 12 | |
- name: macos-12_intel | |
target: x86_64-apple-darwin | |
macos: 12 | |
- name: macos-13_arm | |
target: aarch64-apple-darwin | |
macos: 13 | |
- name: macos-13_intel | |
target: x86_64-apple-darwin | |
macos: 13 | |
- name: macos-14_arm | |
target: aarch64-apple-darwin | |
macos: 14 | |
- name: macos-14_intel | |
target: x86_64-apple-darwin | |
macos: 14 | |
runs-on: macos-${{ matrix.platform.macos }} | |
timeout-minutes: 5 | |
needs: [ build_tag ] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
targets: ${{ matrix.platform.target }} | |
- name: "Build" | |
run: "cargo +stable build --release --target ${{ matrix.platform.target }}" | |
- name: "Rename" | |
run: "cp target/${{ matrix.platform.target }}/release/interactive-rebase-tool target/git-interactive-rebase-tool-${{ needs.build_tag.outputs.release_version }}-${{ matrix.platform.name }}" | |
- name: "Upload Release" | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: target/git-interactive-rebase-tool-${{ needs.build_tag.outputs.release_version }}-${{ matrix.platform.name }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
build-windows: | |
name: "Release Windows_${{ matrix.target }}" | |
strategy: | |
matrix: | |
target: [ 'aarch64', 'x86_64' ] | |
runs-on: windows-latest | |
timeout-minutes: 10 | |
needs: [ build_tag ] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
targets: "${{ matrix.target }}-pc-windows-msvc" | |
- name: "Build" | |
run: "cargo rustc --target ${{ matrix.target }}-pc-windows-msvc --release --bin interactive-rebase-tool" | |
- name: "Rename" | |
run: "copy target/${{ matrix.target }}-pc-windows-msvc/release/interactive-rebase-tool.exe target/git-interactive-rebase-tool-${{ needs.build_tag.outputs.release_version }}-windows-${{ matrix.version }}_${{ matrix.target }}.exe" | |
- name: "Upload Release" | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: target/git-interactive-rebase-tool-${{ needs.build_tag.outputs.release_version }}-windows-${{ matrix.version }}_${{ matrix.target }}.exe | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |