Skip to content

ci: use Node 24 checkout action #1

ci: use Node 24 checkout action

ci: use Node 24 checkout action #1

Workflow file for this run

name: Release
on:
push:
tags: ["v*"]
permissions:
contents: write
jobs:
validate-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Match tag to crate version
shell: bash
run: |
crate_version=$(sed -n 's/^version = "\([^"]*\)"/\1/p' Cargo.toml | head -1)
test "${GITHUB_REF_NAME}" = "v${crate_version}"
build:
needs: validate-version
strategy:
fail-fast: false
matrix:
include:
- os: macos-15
target: aarch64-apple-darwin
asset: codexify-macos-arm64
- os: macos-15-intel
target: x86_64-apple-darwin
asset: codexify-macos-x64
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
asset: codexify-linux-x64
- os: ubuntu-latest
target: aarch64-unknown-linux-gnu
asset: codexify-linux-arm64
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v5
- uses: houseabsolute/actions-rust-cross@v1
with:
command: build
target: ${{ matrix.target }}
args: "--locked --release"
strip: true
- name: Prepare artifact
shell: bash
run: |
cp "target/${{ matrix.target }}/release/codexify" "${{ matrix.asset }}"
chmod +x "${{ matrix.asset }}"
shasum -a 256 "${{ matrix.asset }}" > "${{ matrix.asset }}.sha256"
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.asset }}
path: |
${{ matrix.asset }}
${{ matrix.asset }}.sha256
publish:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
merge-multiple: true
path: dist
- name: Create combined checksums
working-directory: dist
run: cat *.sha256 | sort > checksums.txt
- uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
files: dist/*