Skip to content

Bump to 1.4.4-beta.1 #25

Bump to 1.4.4-beta.1

Bump to 1.4.4-beta.1 #25

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
workflow_dispatch:
permissions:
contents: write
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
# Linux x86_64
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
name: linux-x86_64
build: cargo
- target: x86_64-unknown-linux-musl
os: ubuntu-latest
name: esxi-x86_64
build: cargo
# Linux aarch64 (native ARM runners)
- target: aarch64-unknown-linux-gnu
os: ubuntu-24.04-arm
name: linux-aarch64
build: cargo
- target: aarch64-unknown-linux-musl
os: ubuntu-24.04-arm
name: linux-aarch64-musl
build: cargo
# Linux armv7 (cross-compiled from x86_64)
- target: armv7-unknown-linux-gnueabihf
os: ubuntu-latest
name: linux-armv7
build: cross
- target: armv7-unknown-linux-musleabihf
os: ubuntu-latest
name: linux-armv7-musl
build: cross
# Linux arm (armv5/v6, cross-compiled from x86_64)
- target: arm-unknown-linux-gnueabihf
os: ubuntu-latest
name: linux-arm
build: cross
- target: arm-unknown-linux-musleabihf
os: ubuntu-latest
name: linux-arm-musl
build: cross
# macOS
- target: aarch64-apple-darwin
os: macos-latest
name: macos-aarch64
build: cargo
- target: x86_64-apple-darwin
os: macos-26-intel
name: macos-x86_64
build: cargo
# Windows
- target: x86_64-pc-windows-msvc
os: windows-latest
name: windows-x86_64
build: cargo
- target: aarch64-pc-windows-msvc
os: windows-11-arm
name: windows-aarch64
build: cargo
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Install musl tools (x86_64)
if: matrix.target == 'x86_64-unknown-linux-musl'
run: sudo apt-get update && sudo apt-get install -y musl-tools
- name: Install musl tools (aarch64)
if: matrix.target == 'aarch64-unknown-linux-musl'
run: sudo apt-get update && sudo apt-get install -y musl-tools
- name: Install cross
if: matrix.build == 'cross'
uses: taiki-e/install-action@v2
with:
tool: cross
- name: Build
run: ${{ matrix.build }} build --release --target ${{ matrix.target }}
- name: Archive (Unix)
if: runner.os != 'Windows'
run: |
mkdir -p dist
cp target/${{ matrix.target }}/release/vmkatz dist/vmkatz
# Bundle the Python loader only in the ESXi musl build
if [ "${{ matrix.name }}" = "esxi-x86_64" ]; then
cp tools/vmkatz_loader.py dist/vmkatz_loader.py
fi
tar -C dist -czf vmkatz-${{ github.ref_name }}-${{ matrix.name }}.tar.gz .
- name: Archive (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
New-Item -ItemType Directory -Force -Path dist
Copy-Item target\${{ matrix.target }}\release\vmkatz.exe dist\vmkatz.exe
Compress-Archive -Path dist\vmkatz.exe -DestinationPath vmkatz-${{ github.ref_name }}-${{ matrix.name }}.zip
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: vmkatz-${{ matrix.name }}
path: vmkatz-${{ github.ref_name }}-*
release:
needs: build
runs-on: ubuntu-latest
# Only publish a release on tag pushes, not workflow_dispatch test runs
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
merge-multiple: true
- name: Generate checksums
run: sha256sum vmkatz-* > SHA256SUMS.txt
- name: Generate changelog
id: changelog
run: |
CURRENT_TAG="${{ github.ref_name }}"
# If the current tag is a prerelease (rc/beta/alpha), include previous
# prereleases in the history. Otherwise, skip prereleases so the
# changelog for a final release spans back to the last stable tag.
if echo "$CURRENT_TAG" | grep -qE -- "-(beta|alpha|rc)"; then
PREV_TAG=$(git tag --sort=-v:refname | grep -v "^${CURRENT_TAG}$" | head -1)
else
PREV_TAG=$(git tag --sort=-v:refname | grep -v "^${CURRENT_TAG}$" | grep -v -E -- "-(beta|alpha|rc)" | head -1)
fi
if [ -z "$PREV_TAG" ]; then
PREV_TAG=$(git rev-list --max-parents=0 HEAD)
fi
echo "## Changes since ${PREV_TAG}" > CHANGELOG.md
echo "" >> CHANGELOG.md
git log --pretty=format:"- %s" "${PREV_TAG}..${CURRENT_TAG}" >> CHANGELOG.md
echo "" >> CHANGELOG.md
- name: Publish GitHub Release
uses: softprops/action-gh-release@v2
with:
prerelease: ${{ contains(github.ref_name, '-beta') || contains(github.ref_name, '-alpha') || contains(github.ref_name, '-rc') }}
body_path: CHANGELOG.md
files: |
vmkatz-*
SHA256SUMS.txt