diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 269da13..b8ac6fb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,4 +1,4 @@ -name: Build and Release Native Binaries +name: Compile and Release Binaries on: push: @@ -15,61 +15,61 @@ jobs: platform: linux-x64 - os: macos-latest platform: macos-arm64 - runs-on: ${{ matrix.os }} - + steps: - name: Checkout code uses: actions/checkout@v4 - + + - name: Install dependencies (Linux only) + if: matrix.os == 'ubuntu-latest' + run: "sudo apt-get update && sudo apt-get install -y libssl-dev" + - name: Setup GraalVM uses: graalvm/setup-graalvm@v1 with: - java-version: '24' - distribution: 'graalvm' + java-version: "24" + distribution: "graalvm" + components: "native-image" github-token: ${{ secrets.GITHUB_TOKEN }} - - - name: Setup Gradle - uses: gradle/actions/setup-gradle@v3 - - - name: Build project - run: gradle build - - - name: Build native binary - run: gradle nativeCompile - - - name: Install UPX (Linux) + + - name: Build JAR + run: ./gradlew build + + - name: Compile native binary + run: ./gradlew nativeCompile + + - name: Install UPX (Linux only) if: matrix.os == 'ubuntu-latest' - run: sudo apt-get update && sudo apt-get install -y upx - + run: sudo apt-get update && apt-get install -y upx + - name: Compress binary with UPX (Linux only) if: matrix.os == 'ubuntu-latest' run: upx --best --lzma build/native/nativeCompile/notevc - + - name: Rename binary for platform - run: | - mv build/native/nativeCompile/notevc notevc-${{ matrix.platform }} - + run: mv build/native/nativeCompile/notevc notevc-${{ matrix.platform }} + - name: Upload binary as artifact uses: actions/upload-artifact@v4 with: name: notevc-${{ matrix.platform }} path: notevc-${{ matrix.platform }} - + release: needs: build runs-on: ubuntu-latest permissions: contents: write - + steps: - name: Download all artifacts uses: actions/download-artifact@v4 with: path: binaries - - - name: Create Release - uses: softprops/action-gh-release@v1 + + - name: Create release + uses: actions/gitea-release-action@v1 with: files: binaries/*/* draft: false diff --git a/.gitignore b/.gitignore index 8f8eca0..af0a367 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,7 @@ Thumbs.db # Other *.hprof **/.notevc/ + +!gradle/wrapper/ +!gradle/wrapper/gradle-wrapper.jar +!gradle/wrapper/gradle-wrapper.properties diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..f8e1ee3 Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ