Skip to content

Rust

Rust #17

Workflow file for this run

name: Rust
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
build-macos:
runs-on: macos-11
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cargo build
run: cargo build --verbose --release
shell: bash
- name: Run unitypackage_util help
run: ./target/release/unitypackage_util --help
shell: bash
- name: Adhoc signature
run: |
codesign -s - --options=runtime target/release/unitypackage_util
shell: bash
- name: Prepare artifacts
run: |
export TARGET=unitypackage_util-macos-x86_64
mkdir $TARGET
cp LICENSE $TARGET/unitypackage_util-License.txt
cp target/release/unitypackage_util $TARGET/unitypackage_util-macos-x86_64
7z a -r $TARGET.zip $TARGET
shell: bash
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: unitypackage_util-macos-x86_64.zip
- name: unitypackage_util-macos-x86_64
uses: actions/upload-artifact@v3
with:
name: unitypackage_util-macos-x86_64
path: unitypackage_util-macos-x86_64/*
build-windows:
runs-on: windows-2019
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cargo build
run: cargo build --verbose --release
shell: bash
- name: Run unitypackage_util help
run: |
./target/release/unitypackage_util.exe --help
shell: bash
- name: Prepare artifacts
run: |
export TARGET=unitypackage_util-windows-x86_64
mkdir $TARGET
cp LICENSE $TARGET/unitypackage_util-License.txt
cp target/release/unitypackage_util.exe $TARGET/unitypackage_util-windows-x86_64.exe
7z a -r $TARGET.zip $TARGET
shell: bash
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
unitypackage_util-windows-x86_64.zip
unitypackage_util-windows-x86_64/unitypackage_util-License.txt
- name: unitypackage_util-windows-x86_64
uses: actions/upload-artifact@v3
with:
name: unitypackage_util-windows-x86_64
path: unitypackage_util-windows-x86_64/*
build-linux:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cargo build
run: cargo build --verbose --release
shell: bash
- name: Run unitypackage_util help
run: ./target/release/unitypackage_util --help
shell: bash
- name: Prepare artifacts
run: |
export TARGET=unitypackage_util-linux-x86_64
mkdir $TARGET
cp LICENSE $TARGET/unitypackage_util-License.txt
cp target/release/unitypackage_util $TARGET/unitypackage_util-linux-x86_64
7z a -r $TARGET.zip $TARGET
shell: bash
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: unitypackage_util-linux-x86_64.zip
- name: unitypackage_util-linux-x86_64
uses: actions/upload-artifact@v3
with:
name: unitypackage_util-linux-x86_64
path: unitypackage_util-linux-x86_64/*