@@ -2,8 +2,8 @@ name: Release
22
33on :
44 push :
5- # tags:
6- # - 'v[0-9]+.[0-9]+.[0-9]+'
5+ tags :
6+ - ' v[0-9]+.[0-9]+.[0-9]+'
77
88env :
99 CARGO_TERM_COLOR : always
@@ -19,25 +19,25 @@ jobs:
1919 fail-fast : false
2020 matrix :
2121 include :
22- # # Linux x86_64
23- # - target: x86_64-unknown-linux-gnu
24- # runner: self-hosted
25- # asset_name: x86_64-unknown-linux-gnu
26- #
27- # # Linux ARM64 (aarch64)
28- # - target: aarch64-unknown-linux-gnu
29- # runner: ubuntu-24.04-arm
30- # asset_name: aarch64-unknown-linux-gnu
31- #
32- # # macOS x86_64
33- # - target: x86_64-apple-darwin
34- # runner: macos-13
35- # asset_name: x86_64-apple-darwin
36- #
37- # # macOS ARM64
38- # - target: aarch64-apple-darwin
39- # runner: macos-latest
40- # asset_name: aarch64-apple-darwin
22+ # Linux x86_64
23+ - target : x86_64-unknown-linux-gnu
24+ runner : self-hosted
25+ asset_name : x86_64-unknown-linux-gnu
26+
27+ # Linux ARM64 (aarch64)
28+ - target : aarch64-unknown-linux-gnu
29+ runner : ubuntu-24.04-arm
30+ asset_name : aarch64-unknown-linux-gnu
31+
32+ # macOS x86_64
33+ - target : x86_64-apple-darwin
34+ runner : macos-13
35+ asset_name : x86_64-apple-darwin
36+
37+ # macOS ARM64
38+ - target : aarch64-apple-darwin
39+ runner : macos-latest
40+ asset_name : aarch64-apple-darwin
4141
4242 # Windows x86_64
4343 - target : x86_64-pc-windows-msvc
@@ -51,39 +51,39 @@ jobs:
5151 with :
5252 fetch-depth : 0 # Need full history to verify tag is from "main" branch
5353
54- # - name: Verify tag is from main branch
55- # shell: bash
56- # run: |
57- # # Get the commit SHA that the tag points to
58- # TAG_COMMIT=$(git rev-list -n 1 ${{ github.ref }})
59- #
60- # # Check if this commit exists on main branch
61- # git fetch origin main
62- # if ! git merge-base --is-ancestor $TAG_COMMIT origin/main; then
63- # echo "Error: Tag must be created from main branch!"
64- # echo "This tag points to commit $TAG_COMMIT which is not on main branch."
65- # exit 1
66- # fi
67- # echo "Tag is from main branch (commit: $TAG_COMMIT)"
68- #
69- # # Make sure that Cargo.toml version for each tool is the same as the tag
70- # - name: Verify version consistency
71- # shell: bash
72- # run: |
73- # # Extract version from tag
74- # TAG_VERSION="${GITHUB_REF#refs/tags/v}"
75- #
76- # # Check each tool's Cargo.toml version
77- # for tool in move-mutation-test move-mutator move-spec-test; do
78- # CARGO_VERSION=$(grep "^version" $tool/Cargo.toml | head -1 | cut -d'"' -f2)
79- # if [ "$CARGO_VERSION" != "$TAG_VERSION" ]; then
80- # echo "Error: Version mismatch for $tool!"
81- # echo " Tag version: $TAG_VERSION"
82- # echo " Cargo.toml version: $CARGO_VERSION"
83- # exit 1
84- # fi
85- # echo "$tool version matches: $CARGO_VERSION"
86- # done
54+ - name : Verify tag is from main branch
55+ shell : bash
56+ run : |
57+ # Get the commit SHA that the tag points to
58+ TAG_COMMIT=$(git rev-list -n 1 ${{ github.ref }})
59+
60+ # Check if this commit exists on main branch
61+ git fetch origin main
62+ if ! git merge-base --is-ancestor $TAG_COMMIT origin/main; then
63+ echo "Error: Tag must be created from main branch!"
64+ echo "This tag points to commit $TAG_COMMIT which is not on main branch."
65+ exit 1
66+ fi
67+ echo "Tag is from main branch (commit: $TAG_COMMIT)"
68+
69+ # Make sure that Cargo.toml version for each tool is the same as the tag
70+ - name : Verify version consistency
71+ shell : bash
72+ run : |
73+ # Extract version from tag
74+ TAG_VERSION="${GITHUB_REF#refs/tags/v}"
75+
76+ # Check each tool's Cargo.toml version
77+ for tool in move-mutation-test move-mutator move-spec-test; do
78+ CARGO_VERSION=$(grep "^version" $tool/Cargo.toml | head -1 | cut -d'"' -f2)
79+ if [ "$CARGO_VERSION" != "$TAG_VERSION" ]; then
80+ echo "Error: Version mismatch for $tool!"
81+ echo " Tag version: $TAG_VERSION"
82+ echo " Cargo.toml version: $CARGO_VERSION"
83+ exit 1
84+ fi
85+ echo "$tool version matches: $CARGO_VERSION"
86+ done
8787
8888 - name : Enable long paths on Windows
8989 if : runner.os == 'Windows'
@@ -226,72 +226,72 @@ jobs:
226226 path : |
227227 mutation-tools-${{ matrix.asset_name }}.zip
228228
229- # create-release:
230- # name: Create GitHub Release
231- # runs-on: self-hosted
232- # needs: build-and-release
233- # permissions:
234- # contents: write
235- #
236- # steps:
237- # - name: Checkout code
238- # uses: actions/checkout@v4
239- #
240- # - name: Determine version
241- # id: version
242- # run: |
243- # TAG="${GITHUB_REF#refs/tags/}"
244- # VERSION="${TAG#v}"
245- # echo "version=$VERSION" >> $GITHUB_OUTPUT
246- # echo "tag=$TAG" >> $GITHUB_OUTPUT
247- #
248- # - name: Download all artifacts
249- # uses: actions/download-artifact@v4
250- # with:
251- # path: artifacts
252- #
253- # - name: Prepare release assets
254- # run: |
255- # mkdir -p release-assets
256- # find artifacts -name "*.zip" | while read file; do
257- # cp "$file" release-assets/
258- # done
259- # ls -lh release-assets/
260- #
261- # - name: Create GitHub Release
262- # uses: softprops/action-gh-release@v2
263- # with:
264- # tag_name: ${{ steps.version.outputs.tag }}
265- # name: Move Mutation Tools v${{ steps.version.outputs.version }}
266- # body: |
267- # ## Installation Options
268- #
269- # ### Via Aptos CLI (Recommended for most users)
270- # ```bash
271- # aptos update move-mutation-test
272- # ```
273- # This installs `move-mutation-test` which is the main tool most users need.
274- #
275- # ### Direct Download (All tools)
276- # Download the appropriate archive for your platform below. Each archive contains:
277- # - `move-mutation-test` - Tests the quality of your unit test suite
278- # - `move-mutator` - Core mutation engine for advanced users
279- # - `move-spec-test` - Tests the quality of your formal specifications
280- #
281- # ## Platform Support
282- #
283- # | Platform | Architecture | File |
284- # |----------|--------------|------|
285- # | Linux | x86_64 | `mutation-tools-x86_64-unknown-linux-gnu.zip` |
286- # | Linux | ARM64/aarch64 | `mutation-tools-aarch64-unknown-linux-gnu.zip` |
287- # | macOS | x86_64 (Intel) | `mutation-tools-x86_64-apple-darwin.zip` |
288- # | macOS | ARM64 (Apple Silicon) | `mutation-tools-aarch64-apple-darwin.zip` |
289- # | Windows | x86_64 | `mutation-tools-x86_64-windows.zip` |
290- #
291- # ## Documentation
292- # For usage instructions and examples, visit: https://github.com/eigerco/move-mutation-tools
293- # draft: true
294- # prerelease: false
295- # files: release-assets/*
296- # fail_on_unmatched_files: true
297- # generate_release_notes: true
229+ create-release :
230+ name : Create GitHub Release
231+ runs-on : self-hosted
232+ needs : build-and-release
233+ permissions :
234+ contents : write
235+
236+ steps :
237+ - name : Checkout code
238+ uses : actions/checkout@v4
239+
240+ - name : Determine version
241+ id : version
242+ run : |
243+ TAG="${GITHUB_REF#refs/tags/}"
244+ VERSION="${TAG#v}"
245+ echo "version=$VERSION" >> $GITHUB_OUTPUT
246+ echo "tag=$TAG" >> $GITHUB_OUTPUT
247+
248+ - name : Download all artifacts
249+ uses : actions/download-artifact@v4
250+ with :
251+ path : artifacts
252+
253+ - name : Prepare release assets
254+ run : |
255+ mkdir -p release-assets
256+ find artifacts -name "*.zip" | while read file; do
257+ cp "$file" release-assets/
258+ done
259+ ls -lh release-assets/
260+
261+ - name : Create GitHub Release
262+ uses : softprops/action-gh-release@v2
263+ with :
264+ tag_name : ${{ steps.version.outputs.tag }}
265+ name : Move Mutation Tools v${{ steps.version.outputs.version }}
266+ body : |
267+ ## Installation Options
268+
269+ ### Via Aptos CLI (Recommended for most users)
270+ ```bash
271+ aptos update move-mutation-test
272+ ```
273+ This installs `move-mutation-test` which is the main tool most users need.
274+
275+ ### Direct Download (All tools)
276+ Download the appropriate archive for your platform below. Each archive contains:
277+ - `move-mutation-test` - Tests the quality of your unit test suite
278+ - `move-mutator` - Core mutation engine for advanced users
279+ - `move-spec-test` - Tests the quality of your formal specifications
280+
281+ ## Platform Support
282+
283+ | Platform | Architecture | File |
284+ |----------|--------------|------|
285+ | Linux | x86_64 | `mutation-tools-x86_64-unknown-linux-gnu.zip` |
286+ | Linux | ARM64/aarch64 | `mutation-tools-aarch64-unknown-linux-gnu.zip` |
287+ | macOS | x86_64 (Intel) | `mutation-tools-x86_64-apple-darwin.zip` |
288+ | macOS | ARM64 (Apple Silicon) | `mutation-tools-aarch64-apple-darwin.zip` |
289+ | Windows | x86_64 | `mutation-tools-x86_64-windows.zip` |
290+
291+ ## Documentation
292+ For usage instructions and examples, visit: https://github.com/eigerco/move-mutation-tools
293+ draft : true
294+ prerelease : false
295+ files : release-assets/*
296+ fail_on_unmatched_files : true
297+ generate_release_notes : true
0 commit comments