Skip to content

Update Release Workflow #3

Update Release Workflow

Update Release Workflow #3

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
env:
CARGO_TERM_COLOR: always
jobs:
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: leafo/gh-actions-lua@v10
with:
luaVersion: "luajit-2.0.5"
- name: Build
run: cargo build --verbose --release
env:
LUA_LIB: "./.lua/lib"
- uses: actions/upload-artifact@v4
with:
name: windows-build
path: target/release/json5.dll
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: cargo rustc --verbose --release -- -C link-arg=-undefined -C link-arg=dynamic_lookup
- uses: actions/upload-artifact@v4
with:
name: macos-build
path: target/release/libjson5.dylib
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build --verbose --release
- uses: actions/upload-artifact@v4
with:
name: linux-build
path: target/release/libjson5.so
create-release:
needs: [build-windows,build-linux,build-macos]
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
pattern: "*-build"
- run: mv libjson5.dylib json5.dylib
- run: mv libjson5.so json5.so
- name: Create a Release
uses: ncipollo/release-action@v1
with:
name: JSON5 Lua ${{github.ref_name}}
artifacts: "json5.*"
body: "Macos build is arm64 only"