fix: build self-contained Windows natives #18
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 & Publish to Maven Central | |
| on: | |
| push: | |
| paths: | |
| - 'native/**' | |
| tags: | |
| - '[0-9]+.[0-9]+.[0-9]+' | |
| jobs: | |
| build-natives: | |
| strategy: | |
| matrix: | |
| include: | |
| - { os: ubuntu-latest, name: linux-x64 } | |
| - { os: macos-14, name: macos-arm64 } | |
| - { os: macos-13, name: macos-x64 } | |
| - { os: windows-latest, name: windows-x64 } | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | |
| SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
| GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} | |
| GPG_PASSPHRASE: ${{ secrets.GPG_PASSWORD }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Set up JDK 25 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '25' | |
| distribution: 'graalvm' | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v3 | |
| - name: Setup cmake | |
| uses: jwlawson/actions-setup-cmake@v2 | |
| with: | |
| cmake-version: '3.28.x' | |
| - name: Build & Publish Release | |
| env: | |
| TAG_VERSION: ${{ github.ref_name }} | |
| LUAU_PUBLISH_NATIVES: true | |
| run: | | |
| ./gradlew nmcpPublishAggregationToCentralPortal -PbuildType=Release | |
| - name: artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: luau-natives-${{ matrix.name }}-${{ github.ref_name }}.jar | |
| path: native/build/libs/luau-natives-${{ matrix.name }}-${{ github.ref_name }}.jar | |
| - name: Build & Publish Debug | |
| env: | |
| TAG_VERSION: ${{ github.ref_name }}-debug | |
| LUAU_PUBLISH_NATIVES: true | |
| run: | | |
| ./gradlew nmcpPublishAggregationToCentralPortal -PbuildType=Debug |