Release v2.0.1 #34
Workflow file for this run
This file contains hidden or 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
| name: Build | |
| on: | |
| release: | |
| types: [published] | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| name: ${{ matrix.platform.os_name }} with rust ${{ matrix.toolchain }} | |
| runs-on: ${{ matrix.platform.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: | |
| - os_name: linux-x86_64 | |
| os: ubuntu-latest | |
| target: x86_64-unknown-linux-gnu | |
| origin_dylib_suffix: so | |
| dest_dylib_suffix: so | |
| - os_name: linux-aarch64 | |
| os: ubuntu-latest | |
| target: aarch64-unknown-linux-gnu | |
| origin_dylib_suffix: so | |
| dest_dylib_suffix: so | |
| - os_name: mac-x86_64 | |
| os: macOS-latest | |
| target: x86_64-apple-darwin | |
| origin_dylib_suffix: dylib | |
| dest_dylib_suffix: so | |
| - os_name: mac-aarch64 | |
| os: macOS-latest | |
| target: aarch64-apple-darwin | |
| origin_dylib_suffix: dylib | |
| dest_dylib_suffix: so | |
| - os_name: windows-x86_64 | |
| os: windows-latest | |
| target: x86_64-pc-windows-msvc | |
| origin_dylib_suffix: dll | |
| dest_dylib_suffix: dll | |
| toolchain: | |
| - stable | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Install dependencies for vendored builds | |
| if: contains(matrix.platform.target, 'linux') | |
| run: | | |
| sudo apt-get update | |
| # Install build tools for vendored OpenSSL | |
| sudo apt-get install -y make perl | |
| - name: Build link lib | |
| uses: houseabsolute/actions-rust-cross@v0 | |
| with: | |
| command: "build" | |
| working-directory: ./generator | |
| target: ${{ matrix.platform.target }} | |
| toolchain: ${{ matrix.toolchain }} | |
| args: "--release" | |
| - name: List files | |
| shell: bash | |
| run: ls -R generator/target/${{ matrix.platform.target }}/release/ | |
| - name: Rename dynamic lib | |
| shell: bash | |
| run: cp -rf generator/target/${{ matrix.platform.target }}/release/${{ startsWith(matrix.platform.target, 'x86_64-pc-windows-msvc') && 'generator' || 'libgenerator' }}.${{ matrix.platform.origin_dylib_suffix }} lua/${{ matrix.platform.os_name }}_generator.${{ matrix.platform.dest_dylib_suffix }} | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.platform.os_name }}_generator | |
| path: lua/${{ matrix.platform.os_name }}_generator.${{ matrix.platform.dest_dylib_suffix }} | |
| upload-to-release: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Upload to release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: ${{ github.event.release.tag_name }} | |
| files: | | |
| artifacts/linux-x86_64_generator/* | |
| artifacts/linux-aarch64_generator/* | |
| artifacts/mac-x86_64_generator/* | |
| artifacts/mac-aarch64_generator/* | |
| artifacts/windows-x86_64_generator/* |