fix(workflow): fixed release action
This commit is contained in:
29
.github/workflows/release.yml
vendored
29
.github/workflows/release.yml
vendored
@@ -15,15 +15,16 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
name: Build ${{ matrix.platform }}
|
name: Build ${{ matrix.platform }}
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false # Don't cancel other builds if one fails
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
platform: linux-x64
|
platform: linux-x64
|
||||||
binary-name: notevc
|
binary-name: notevc
|
||||||
- os: macos-13
|
- os: macos-15-intel # Updated from macos-13
|
||||||
platform: macos-x64
|
platform: macos-x64
|
||||||
binary-name: notevc
|
binary-name: notevc
|
||||||
- os: macos-14
|
- os: macos-latest # This is ARM64
|
||||||
platform: macos-arm64
|
platform: macos-arm64
|
||||||
binary-name: notevc
|
binary-name: notevc
|
||||||
|
|
||||||
@@ -36,10 +37,16 @@ jobs:
|
|||||||
- name: Setup GraalVM
|
- name: Setup GraalVM
|
||||||
uses: graalvm/setup-graalvm@v1
|
uses: graalvm/setup-graalvm@v1
|
||||||
with:
|
with:
|
||||||
java-version: '24'
|
java-version: '21' # Changed back to 21 for better compatibility
|
||||||
distribution: 'graalvm'
|
distribution: 'graalvm'
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Install native build tools (Linux)
|
||||||
|
if: runner.os == 'Linux'
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y build-essential zlib1g-dev
|
||||||
|
|
||||||
- name: Cache Gradle packages
|
- name: Cache Gradle packages
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
@@ -56,6 +63,11 @@ jobs:
|
|||||||
- name: Build native binary
|
- name: Build native binary
|
||||||
run: ./gradlew clean nativeCompile
|
run: ./gradlew clean nativeCompile
|
||||||
|
|
||||||
|
- name: Verify binary exists
|
||||||
|
run: |
|
||||||
|
ls -la build/native/nativeCompile/
|
||||||
|
file build/native/nativeCompile/${{ matrix.binary-name }}
|
||||||
|
|
||||||
- name: Package binary
|
- name: Package binary
|
||||||
run: |
|
run: |
|
||||||
mkdir -p dist
|
mkdir -p dist
|
||||||
@@ -82,7 +94,7 @@ jobs:
|
|||||||
name: Create Release
|
name: Create Release
|
||||||
needs: build
|
needs: build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'
|
if: (startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch') && !cancelled()
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
@@ -119,13 +131,7 @@ jobs:
|
|||||||
draft: false
|
draft: false
|
||||||
prerelease: false
|
prerelease: false
|
||||||
generate_release_notes: true
|
generate_release_notes: true
|
||||||
files: |
|
files: release-assets/*
|
||||||
release-assets/notevc-linux-x64.tar.gz
|
|
||||||
release-assets/notevc-macos-x64.tar.gz
|
|
||||||
release-assets/notevc-macos-arm64.tar.gz
|
|
||||||
release-assets/notevc-linux-x64.tar.gz.sha256
|
|
||||||
release-assets/notevc-macos-x64.tar.gz.sha256
|
|
||||||
release-assets/notevc-macos-arm64.tar.gz.sha256
|
|
||||||
body: |
|
body: |
|
||||||
## NoteVC ${{ steps.version.outputs.version }}
|
## NoteVC ${{ steps.version.outputs.version }}
|
||||||
|
|
||||||
@@ -176,3 +182,4 @@ jobs:
|
|||||||
if [ -f release-assets/notevc-macos-arm64.tar.gz.sha256 ]; then
|
if [ -f release-assets/notevc-macos-arm64.tar.gz.sha256 ]; then
|
||||||
echo "macOS ARM64: $(cat release-assets/notevc-macos-arm64.tar.gz.sha256 | cut -d' ' -f1)"
|
echo "macOS ARM64: $(cat release-assets/notevc-macos-arm64.tar.gz.sha256 | cut -d' ' -f1)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user