52 lines
1.5 KiB
YAML
52 lines
1.5 KiB
YAML
name: release
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
tags:
|
|
- "v*"
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ${{ matrix.info.runs-on }}
|
|
strategy:
|
|
matrix:
|
|
info:
|
|
- os: "macOS-arm"
|
|
runs-on: "macos-latest"
|
|
executable-extension: ""
|
|
- os: "macOS-intel"
|
|
runs-on: "macos-26-intel"
|
|
executable-extension: ""
|
|
- os: "linux-x86_64"
|
|
runs-on: "ubuntu-latest"
|
|
executable-extension: ""
|
|
- os: "linux-arm"
|
|
runs-on: "ubuntu-24.04-arm"
|
|
executable-extension: ""
|
|
- os: "Windows-x86_64"
|
|
runs-on: "windows-latest"
|
|
executable-extension: ".exe"
|
|
- os: "Windows-arm"
|
|
runs-on: "windows-11-arm"
|
|
executable-extension: ".exe"
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- name: check version
|
|
# cut off the v part of the tag to only search for the number
|
|
run: grep -q "$(echo "${{ github.ref_name }}" | cut -c2-)" Cargo.toml
|
|
- run: cargo test --release
|
|
- run: cargo build --release --locked
|
|
- name: package
|
|
# TODO: include completions/man page
|
|
run: tar -azcf "hexapoda-${{ matrix.info.os }}-${{ github.ref_name }}.zip" -C "target/release/" "hexapoda${{ matrix.info.executable-extension }}"
|
|
- name: release
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
draft: true
|
|
name: "${{ github.ref_name }}"
|
|
files: hexapoda-${{ matrix.info.os }}-${{ github.ref_name }}.zip
|