@@ -12,23 +12,68 @@ permissions:
1212jobs :
1313 build :
1414 strategy :
15+ fail-fast : false
1516 matrix :
1617 include :
18+ # Linux x86_64
1719 - target : x86_64-unknown-linux-gnu
1820 os : ubuntu-latest
1921 name : linux-x86_64
22+ build : cargo
2023 - target : x86_64-unknown-linux-musl
2124 os : ubuntu-latest
2225 name : esxi-x86_64
23- - target : x86_64-pc-windows-msvc
24- os : windows-latest
25- name : windows-x86_64
26- - target : x86_64-apple-darwin
27- os : macos-latest
28- name : macos-x86_64
26+ build : cargo
27+
28+ # Linux aarch64 (native ARM runners)
29+ - target : aarch64-unknown-linux-gnu
30+ os : ubuntu-24.04-arm
31+ name : linux-aarch64
32+ build : cargo
33+ - target : aarch64-unknown-linux-musl
34+ os : ubuntu-24.04-arm
35+ name : linux-aarch64-musl
36+ build : cargo
37+
38+ # Linux armv7 (cross-compiled from x86_64)
39+ - target : armv7-unknown-linux-gnueabihf
40+ os : ubuntu-latest
41+ name : linux-armv7
42+ build : cross
43+ - target : armv7-unknown-linux-musleabihf
44+ os : ubuntu-latest
45+ name : linux-armv7-musl
46+ build : cross
47+
48+ # Linux arm (armv5/v6, cross-compiled from x86_64)
49+ - target : arm-unknown-linux-gnueabihf
50+ os : ubuntu-latest
51+ name : linux-arm
52+ build : cross
53+ - target : arm-unknown-linux-musleabihf
54+ os : ubuntu-latest
55+ name : linux-arm-musl
56+ build : cross
57+
58+ # macOS
2959 - target : aarch64-apple-darwin
3060 os : macos-latest
3161 name : macos-aarch64
62+ build : cargo
63+ - target : x86_64-apple-darwin
64+ os : macos-26-intel
65+ name : macos-x86_64
66+ build : cargo
67+
68+ # Windows
69+ - target : x86_64-pc-windows-msvc
70+ os : windows-latest
71+ name : windows-x86_64
72+ build : cargo
73+ - target : aarch64-pc-windows-msvc
74+ os : windows-11-arm
75+ name : windows-aarch64
76+ build : cargo
3277
3378 runs-on : ${{ matrix.os }}
3479
@@ -41,19 +86,33 @@ jobs:
4186 with :
4287 targets : ${{ matrix.target }}
4388
44- - name : Install musl tools
89+ - name : Install musl tools (x86_64)
4590 if : matrix.target == 'x86_64-unknown-linux-musl'
4691 run : sudo apt-get update && sudo apt-get install -y musl-tools
4792
93+ - name : Install musl tools (aarch64)
94+ if : matrix.target == 'aarch64-unknown-linux-musl'
95+ run : sudo apt-get update && sudo apt-get install -y musl-tools
96+
97+ - name : Install cross
98+ if : matrix.build == 'cross'
99+ uses : taiki-e/install-action@v2
100+ with :
101+ tool : cross
102+
48103 - name : Build
49- run : cargo build --release --target ${{ matrix.target }}
104+ run : ${{ matrix.build }} build --release --target ${{ matrix.target }}
50105
51106 - name : Archive (Unix)
52107 if : runner.os != 'Windows'
53108 run : |
54109 mkdir -p dist
55110 cp target/${{ matrix.target }}/release/vmkatz dist/vmkatz
56- tar -C dist -czf vmkatz-${{ github.ref_name }}-${{ matrix.name }}.tar.gz vmkatz
111+ # Bundle the Python loader only in the ESXi musl build
112+ if [ "${{ matrix.name }}" = "esxi-x86_64" ]; then
113+ cp tools/vmkatz_loader.py dist/vmkatz_loader.py
114+ fi
115+ tar -C dist -czf vmkatz-${{ github.ref_name }}-${{ matrix.name }}.tar.gz .
57116
58117 - name : Archive (Windows)
59118 if : runner.os == 'Windows'
72131 release :
73132 needs : build
74133 runs-on : ubuntu-latest
134+ # Only publish a release on tag pushes, not workflow_dispatch test runs
135+ if : startsWith(github.ref, 'refs/tags/v')
75136 steps :
76137 - name : Checkout
77138 uses : actions/checkout@v4
@@ -89,14 +150,21 @@ jobs:
89150 - name : Generate changelog
90151 id : changelog
91152 run : |
92- # Find the previous tag
93- PREV_TAG=$(git tag --sort=-v:refname | grep -v "${{ github.ref_name }}" | head -1)
153+ CURRENT_TAG="${{ github.ref_name }}"
154+ # If the current tag is a prerelease (rc/beta/alpha), include previous
155+ # prereleases in the history. Otherwise, skip prereleases so the
156+ # changelog for a final release spans back to the last stable tag.
157+ if echo "$CURRENT_TAG" | grep -qE -- "-(beta|alpha|rc)"; then
158+ PREV_TAG=$(git tag --sort=-v:refname | grep -v "^${CURRENT_TAG}$" | head -1)
159+ else
160+ PREV_TAG=$(git tag --sort=-v:refname | grep -v "^${CURRENT_TAG}$" | grep -v -E -- "-(beta|alpha|rc)" | head -1)
161+ fi
94162 if [ -z "$PREV_TAG" ]; then
95163 PREV_TAG=$(git rev-list --max-parents=0 HEAD)
96164 fi
97165 echo "## Changes since ${PREV_TAG}" > CHANGELOG.md
98166 echo "" >> CHANGELOG.md
99- git log --pretty=format:"- %s" "${PREV_TAG}..${{ github.ref_name } }" >> CHANGELOG.md
167+ git log --pretty=format:"- %s" "${PREV_TAG}..${CURRENT_TAG }" >> CHANGELOG.md
100168 echo "" >> CHANGELOG.md
101169
102170 - name : Publish GitHub Release
0 commit comments