Skip to content

+ Binary CI

+ Binary CI #10

Workflow file for this run

name: Binary
on:
push:
tags:
- "*.*.*"
jobs:
publish:
name: ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: windows-latest
target: x86_64-pc-windows-msvc
use-cross: false
binary_ext: ".exe"
- os: macos-latest
target: x86_64-apple-darwin
use-cross: false
strip: strip
- os: macos-latest
target: aarch64-apple-darwin
use-cross: false
strip: strip
steps:
- uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
target: ${{ matrix.target }}
- name: Build
shell: bash
run: |
cd three_body_e2021; cargo build --target ${{ matrix.target }} --release
- name: Strip binary
if: matrix.strip
run: ${{ matrix.strip }} target/${{ matrix.target }}/release/3body
- name: "Compress binaries"
if: true
uses: master-atul/tar-action@v1.0.2
with:
command: c
cwd: "./target/${{ matrix.target }}/release"
files: "3body"
outPath: "3body-${{ matrix.target }}${{ matrix.binary_ext }}.tar.gz"
- name: "Release binaries"
uses: pragmatrix/release-action@exp
with:
owner: rustq
repo: 3body-lang
tag: ${{ env.RELEASE_VERSION }}
allowUpdates: true
replacesArtifacts: true
artifacts: "3body-${{ matrix.target }}${{ matrix.binary_ext }}.tar.gz"
artifactErrorsFailBuild: true
token: ${{ secrets.GITHUB_TOKEN }}
prerelease: true