feat: release action
This commit is contained in:
34
.github/workflows/release.yml
vendored
34
.github/workflows/release.yml
vendored
@@ -1,4 +1,4 @@
|
|||||||
name: Build and Release Native Binaries
|
name: Compile and Release Binaries
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@@ -15,40 +15,40 @@ jobs:
|
|||||||
platform: linux-x64
|
platform: linux-x64
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
platform: macos-arm64
|
platform: macos-arm64
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
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
|
- name: Setup GraalVM
|
||||||
uses: graalvm/setup-graalvm@v1
|
uses: graalvm/setup-graalvm@v1
|
||||||
with:
|
with:
|
||||||
java-version: '24'
|
java-version: "24"
|
||||||
distribution: 'graalvm'
|
distribution: "graalvm"
|
||||||
|
components: "native-image"
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Setup Gradle
|
- name: Build JAR
|
||||||
uses: gradle/actions/setup-gradle@v3
|
run: ./gradlew build
|
||||||
|
|
||||||
- name: Build project
|
- name: Compile native binary
|
||||||
run: gradle build
|
run: ./gradlew nativeCompile
|
||||||
|
|
||||||
- name: Build native binary
|
- name: Install UPX (Linux only)
|
||||||
run: gradle nativeCompile
|
|
||||||
|
|
||||||
- name: Install UPX (Linux)
|
|
||||||
if: matrix.os == 'ubuntu-latest'
|
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)
|
- name: Compress binary with UPX (Linux only)
|
||||||
if: matrix.os == 'ubuntu-latest'
|
if: matrix.os == 'ubuntu-latest'
|
||||||
run: upx --best --lzma build/native/nativeCompile/notevc
|
run: upx --best --lzma build/native/nativeCompile/notevc
|
||||||
|
|
||||||
- name: Rename binary for platform
|
- name: Rename binary for platform
|
||||||
run: |
|
run: mv build/native/nativeCompile/notevc notevc-${{ matrix.platform }}
|
||||||
mv build/native/nativeCompile/notevc notevc-${{ matrix.platform }}
|
|
||||||
|
|
||||||
- name: Upload binary as artifact
|
- name: Upload binary as artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
@@ -68,8 +68,8 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
path: binaries
|
path: binaries
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: actions/gitea-release-action@v1
|
||||||
with:
|
with:
|
||||||
files: binaries/*/*
|
files: binaries/*/*
|
||||||
draft: false
|
draft: false
|
||||||
|
|||||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -29,3 +29,7 @@ Thumbs.db
|
|||||||
# Other
|
# Other
|
||||||
*.hprof
|
*.hprof
|
||||||
**/.notevc/
|
**/.notevc/
|
||||||
|
|
||||||
|
!gradle/wrapper/
|
||||||
|
!gradle/wrapper/gradle-wrapper.jar
|
||||||
|
!gradle/wrapper/gradle-wrapper.properties
|
||||||
|
|||||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
Binary file not shown.
Reference in New Issue
Block a user