Skip to content

version 0.3.1

version 0.3.1 #1

Workflow file for this run

name: Release
on:
push:
tags: ["*"]
jobs:
build-cross:
name: Build and release (${{ matrix.build }}/${{ matrix.target}})
runs-on: ${{ matrix.runner }}
strategy:
matrix:
include:
- build: macos
runner: macos-latest
target: x86_64-apple-darwin
- build: windows-gnu
runner: windows-latest
target: x86_64-pc-windows-gnu
steps:
- uses: actions/checkout@v1
with:
submodules: true
- name: Setup Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Get version from Git tag
shell: bash
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: Build
uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --verbose --release --target ${{ matrix.target }}
- name: Build archive
shell: bash
run: |
dirname="run-in-roblox-${{ env.VERSION }}-${{ matrix.target }}"
mkdir "$dirname"
if [ "${{ matrix.build }}" = "windows-gnu" ]; then
mv "target/${{ matrix.target }}/release/run-in-roblox.exe" "$dirname"
else
mv "target/${{ matrix.target }}/release/run-in-roblox" "$dirname"
fi
if [ "${{ matrix.build }}" = "windows-gnu" ]; then
7z a "$dirname.zip" "$dirname"
echo "ASSET=$dirname.zip" >> $GITHUB_ENV
else
tar -czf "$dirname.tar.gz" "$dirname"
echo "ASSET=$dirname.tar.gz" >> $GITHUB_ENV
fi
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
${{ env.ASSET }}