fix: silicon directories if not existing #17
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
tags: | |
- "v*" | |
name: Create Release | |
jobs: | |
build: | |
name: Publish Ubuntu release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install latest rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
default: true | |
override: true | |
- name: build | |
run: cargo build --all --release && strip target/release/libsilicon.so && mv target/release/libsilicon.so lua/silicon.so | |
- name: Archive Release | |
uses: thedoctor0/zip-release@main | |
with: | |
type: 'tar' | |
path: 'lua' | |
filename: 'silicon-linux.tar.gz' | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
generate_release_notes: true | |
files: | | |
silicon-linux.tar.gz | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
build-win: | |
name: Publish Windows release | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- name: Install latest rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
default: true | |
override: true | |
- name: Build | |
run: cargo build --all --release | |
- name: Copy file | |
run: copy target\release\silicon.dll .\lua | |
shell: cmd | |
- name: Archive Release | |
uses: thedoctor0/zip-release@main | |
with: | |
type: 'zip' | |
path: 'lua' | |
filename: 'silicon-win.zip' | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: silicon-win.zip | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
build-mac: | |
name: Publish MacOS release | |
runs-on: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install latest rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
target: x86_64-apple-darwin | |
default: true | |
override: true | |
- name: Install missing dependencies | |
run: brew install pkg-config | |
- name: build | |
run: cargo build --all --release && mv target/release/libsilicon.dylib lua/silicon.so | |
- name: Archive Release | |
uses: thedoctor0/zip-release@main | |
with: | |
type: 'tar' | |
path: 'lua' | |
filename: 'silicon-mac-x86_64.tar.gz' | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
generate_release_notes: true | |
files: | | |
silicon-mac-x86_64.tar.gz | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
build-mac-arm64: | |
name: Publish MacOS arm64 release | |
runs-on: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install latest rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
target: aarch64-apple-darwin | |
default: true | |
override: true | |
- name: Install missing dependencies | |
run: brew install pkg-config | |
- name: build | |
run: cargo build --all --release --target aarch64-apple-darwin && mv target/aarch64-apple-darwin/release/libsilicon.dylib lua/silicon.so | |
- name: Archive Release | |
uses: thedoctor0/zip-release@main | |
with: | |
type: 'tar' | |
path: 'lua' | |
filename: 'silicon-mac-arm64.tar.gz' | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
generate_release_notes: true | |
files: | | |
silicon-mac-arm64.tar.gz | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |