name: Release
on:
push:
tags:
- "v*"
workflow_dispatch:
permissions:
contents: write
jobs:
build:
name: Build (${{ matrix.target }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
- target: x86_64-unknown-linux-musl
os: ubuntu-latest
use_cross: true
- target: i686-unknown-linux-gnu
os: ubuntu-latest
use_cross: true
- target: i686-unknown-linux-musl
os: ubuntu-latest
use_cross: true
- target: aarch64-unknown-linux-gnu
os: ubuntu-latest
use_cross: true
- target: aarch64-unknown-linux-musl
os: ubuntu-latest
use_cross: true
- target: armv7-unknown-linux-gnueabihf
os: ubuntu-latest
use_cross: true
- target: x86_64-pc-windows-msvc
os: windows-latest
- target: i686-pc-windows-msvc
os: windows-latest
- target: aarch64-pc-windows-msvc
os: windows-latest
- target: x86_64-apple-darwin
os: macos-latest
- target: aarch64-apple-darwin
os: macos-latest
steps:
- uses: actions/checkout@v5
- name: 🛠️ Build CLI (swt)
uses: sircesarium/refinery-rs@v2.0
with:
target: ${{ matrix.target }}
binary-name: "swt"
use-cross: ${{ matrix.use_cross || false }}
export-libs: false
- name: 🛠️ Build LSP (sweet-lsp)
uses: sircesarium/refinery-rs@v2.0
with:
target: ${{ matrix.target }}
binary-name: "sweet-lsp"
features: "lsp"
use-cross: ${{ matrix.use_cross || false }}
export-libs: false
- name: 📦 Upload Artifacts
uses: actions/upload-artifact@v5
with:
name: bin-${{ matrix.target }}
path: artifacts/*
publish:
name: Create Release & Publish
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: 🚢 Publish to Crates.io
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
run: cargo publish
- name: 📥 Download All Binaries
uses: actions/download-artifact@v5
with:
path: all-artifacts
merge-multiple: true
- name: 🚀 Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: all-artifacts/*
generate_release_notes: true