fixing 2 #85
This file contains 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 macOS Executable | |
on: | |
push: | |
branches: | |
- main | |
- exe_fix | |
jobs: | |
build-macos: | |
runs-on: macos-latest | |
steps: | |
# Step 1: Checkout the code | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Initialize Git Submodules | |
run: | | |
git submodule init | |
git submodule update | |
# Step 2: Set up Homebrew | |
- name: Set up Homebrew | |
run: | | |
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile | |
eval "$(/opt/homebrew/bin/brew shellenv)" | |
brew update | |
# Step 3: Install required tools | |
- name: Install Required System Tools | |
run: | | |
brew install pkg-config mysql-client java | |
export PATH="/usr/local/opt/mysql-client/bin:$PATH" | |
export PKG_CONFIG_PATH="/usr/local/opt/mysql-client/lib/pkgconfig" | |
export MYSQLCLIENT_CFLAGS="-I/usr/local/opt/mysql-client/include" | |
export MYSQLCLIENT_LDFLAGS="-L/usr/local/opt/mysql-client/lib" | |
# Step 4: Configure Java environment | |
- name: Configure Java Environment | |
run: | | |
export JAVA_HOME=$(/usr/libexec/java_home) | |
export PATH="$JAVA_HOME/bin:$PATH" | |
java -version | |
# Step 5: Make the build script executable | |
- name: Make build script executable | |
run: chmod +x .github/workflows/build-saltify.sh | |
# Step 6: Run the Saltify build script | |
- name: Run Saltify Build Script | |
run: ./.github/workflows/build-saltify.sh | |
# Step 7: Upload the built artifact | |
- name: Upload macOS Build Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Saltify_macOS | |
path: dist/Saltify.zip |