|
50 | 50 | JRELEASER_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} |
51 | 51 | run: ./gradlew native:publish native:jreleaserRelease -Ptarget=${{ matrix.target }} |
52 | 52 |
|
| 53 | + linux-musl: |
| 54 | + strategy: |
| 55 | + matrix: |
| 56 | + include: |
| 57 | + - target: x86_64-unknown-linux-musl |
| 58 | + arch: x86_64 |
| 59 | + - target: aarch64-unknown-linux-musl |
| 60 | + arch: aarch64 |
| 61 | + |
| 62 | + name: Publish ${{ matrix.target }} |
| 63 | + environment: MavenRelease |
| 64 | + runs-on: ubuntu-latest |
| 65 | + container: |
| 66 | + image: clux/muslrust:stable |
| 67 | + steps: |
| 68 | + - name: Checkout sources |
| 69 | + uses: taiki-e/checkout-action@v1 |
| 70 | + - name: Install Essentials |
| 71 | + run: | |
| 72 | + apt-get update -y |
| 73 | + apt-get upgrade -y |
| 74 | + apt-get install -y gcc musl-tools curl openjdk-17-jdk-headless |
| 75 | + - name: Install Rust toolchain |
| 76 | + run: | |
| 77 | + rustup target add x86_64-unknown-linux-musl ${{ matrix.target }} |
| 78 | + - name: Install linker dependencies |
| 79 | + run: | |
| 80 | + mkdir -p /opt/musl |
| 81 | + curl -L https://github.com/MinnDevelopment/musl-cross-mirror/releases/download/v0.0.1/${{ matrix.arch }}-linux-musl-cross.tgz | tar xz -C /opt/musl |
| 82 | + - name: Build and Publish |
| 83 | + env: |
| 84 | + JRELEASER_MAVENCENTRAL_USERNAME: ${{ secrets.MAVENCENTRAL_USERNAME }} |
| 85 | + JRELEASER_MAVENCENTRAL_TOKEN: ${{ secrets.MAVENCENTRAL_TOKEN }} |
| 86 | + JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.GPG_PUBLIC_KEY }} |
| 87 | + JRELEASER_GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }} |
| 88 | + JRELEASER_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} |
| 89 | + RUSTFLAGS: "-C target-feature=-crt-static -C link-args=-static-libgcc" |
| 90 | + run: | |
| 91 | + export PATH="/opt/musl/${{ matrix.arch }}-linux-musl-cross/bin:$PATH" |
| 92 | + ./gradlew native:publish native:jreleaserRelease -Ptarget=${{ matrix.target }} |
| 93 | +
|
53 | 94 | windows: |
54 | 95 | strategy: |
55 | 96 | matrix: |
|
85 | 126 |
|
86 | 127 | macos: |
87 | 128 | name: Build macOS universal binary |
| 129 | + environment: MavenRelease |
88 | 130 | runs-on: macos-14 |
89 | 131 | steps: |
90 | 132 | - name: Checkout sources |
|
0 commit comments