Skip to content

Squashed commit of the following: (#3) #1

Squashed commit of the following: (#3)

Squashed commit of the following: (#3) #1

Workflow file for this run

name: "evil-helix - build tag"
on:
push:
tags:
- "release-*"
permissions: write-all
env:
RUST_BACKTRACE: 1
HELIX_LOG_LEVEL: info
HELIX_DEFAULT_RUNTIME: /opt/helix/runtime
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
strategy:
fail-fast: false
matrix:
target:
- id: x86_64-unknown-linux-gnu
name: amd64-linux
native: true
os: ubuntu-latest
- id: aarch64-unknown-linux-gnu
name: aarch64-linux
native: false
os: ubuntu-latest
- id: aarch64-unknown-linux-musl
name: aarch64-linux-musl
native: false
os: ubuntu-latest
- id: arm-unknown-linux-musleabihf
name: armv6-linux-musl
native: false
os: ubuntu-latest
- id: x86_64-apple-darwin
name: amd64-macos
native: true
os: macos-latest
- id: aarch64-apple-darwin
name: aarch64-macos
native: true
os: macos-latest
runs-on: ${{ matrix.target.os }}
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install stable toolchain
uses: dtolnay/[email protected]
with:
targets: ${{ matrix.target.id }}
- name: Install binstall
uses: "cargo-bins/[email protected]"
if: ${{ !matrix.target.native}}
- name: "Install cross"
run: "cargo binstall -y cross"
if: ${{ !matrix.target.native}}
- uses: Swatinem/rust-cache@v2
with:
shared-key: "build"
- name: Build
run: |
rustup target add ${{ matrix.target.id }}
cargo build --target ${{ matrix.target.id }} --profile opt
if: ${{ matrix.target.native}}
- name: Build (cross)
run: cross build --target ${{ matrix.target.id }} --profile opt
if: ${{ !matrix.target.native}}
- name: "Prepare dist"
run: |
mkdir -pv dist/helix
mv -v target/${{ matrix.target.id }}/opt/hx dist/helix/
rm -rf runtime/grammars/sources
mv -v runtime dist/helix/
cd dist && tar -cvzf helix-${{ matrix.target.name }}.tar.gz helix
- name: "Upload artifacts"
uses: actions/upload-artifact@v4
with:
name: helix-${{ matrix.target.name }}
path: dist/helix-${{ matrix.target.name }}.tar.gz
- name: Release suffix
id: release-suffix
run: echo "::set-output name=suffix::$(date +'%Y%m%d')"
- name: Create release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist/*
file_glob: true
tag: ${{ github.ref }}
release_name: evil-helix-${{steps.release-suffix.outputs.suffix}}
overwrite: true