Skip to content

Rename plist

Rename plist #9

name: Snapshot Deploy
on:
push:
branches: [ main ]
jobs:
build-linux:
runs-on: ubuntu-22.04
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Build native code (Linux)
run: |
cd native && mkdir build && cd build
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release ..
make -j4
- name: Set up Java 25
uses: actions/setup-java@v4
with:
java-version: '25'
distribution: 'temurin'
cache: 'maven'
- name: Generate settings.xml
run: |
cat > ~/.m2/settings.xml << EOF
<settings>
<servers>
<server>
<id>repsy-snapshots</id>
<username>${{ secrets.REPSY_USERNAME }}</username>
<password>${{ secrets.REPSY_PASSWORD }}</password>
</server>
</servers>
</settings>
EOF
- name: Build and deploy
run: |
cd java
set -x
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
echo "Detected version: $VERSION"
if [[ $VERSION == *"SNAPSHOT"* ]]; then
echo "Deploying snapshot version: $VERSION"
mvn deploy -U -B
else
echo "Skipping deploy for release version: $VERSION"
mvn install
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-macos-x86:
runs-on: macos-13
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Build native code (macOS x86_64)
run: |
cd native && mkdir build && cd build
cmake -G "Xcode" -DPROJECT_ARCH="x86_64" ..
xcodebuild -project ceffx.xcodeproj -configuration Release
- name: Set up Java 25
uses: actions/setup-java@v4
with:
java-version: '25'
distribution: 'temurin'
cache: 'maven'
- name: Generate settings.xml
run: |
cat > ~/.m2/settings.xml << EOF
<settings>
<servers>
<server>
<id>repsy-snapshots</id>
<username>${{ secrets.REPSY_USERNAME }}</username>
<password>${{ secrets.REPSY_PASSWORD }}</password>
</server>
</servers>
</settings>
EOF
- name: Build and deploy
run: |
cd java
set -x
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
echo "Detected version: $VERSION"
if [[ $VERSION == *"SNAPSHOT"* ]]; then
echo "Deploying snapshot version: $VERSION"
mvn deploy -U -B
else
echo "Skipping deploy for release version: $VERSION"
mvn install
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-macos-arm64:
runs-on: macos-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Build native code (macOS arm64)
run: |
cd native && mkdir build && cd build
cmake -G "Xcode" -DPROJECT_ARCH="arm64" ..
xcodebuild -project ceffx.xcodeproj -configuration Release
- name: Set up Java 25
uses: actions/setup-java@v4
with:
java-version: '25'
distribution: 'temurin'
cache: 'maven'
- name: Generate settings.xml
run: |
cat > ~/.m2/settings.xml << EOF
<settings>
<servers>
<server>
<id>repsy-snapshots</id>
<username>${{ secrets.REPSY_USERNAME }}</username>
<password>${{ secrets.REPSY_PASSWORD }}</password>
</server>
</servers>
</settings>
EOF
- name: Build and deploy
run: |
cd java
set -x
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
echo "Detected version: $VERSION"
if [[ $VERSION == *"SNAPSHOT"* ]]; then
echo "Deploying snapshot version: $VERSION"
mvn deploy -U -B
else
echo "Skipping deploy for release version: $VERSION"
mvn install
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-windows:
runs-on: windows-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Build native code (Windows)
run: |
cd native
mkdir build
cd build
cmake -G "Visual Studio 17" -A x64 ..
cmake --build . --config Release
- name: Set up Java 25
uses: actions/setup-java@v4
with:
java-version: '25'
distribution: 'temurin'
cache: 'maven'
- name: Generate settings.xml
shell: pwsh
run: |
$xml = @"
<settings>
<servers>
<server>
<id>repsy-snapshots</id>
<username>${{ secrets.REPSY_USERNAME }}</username>
<password>${{ secrets.REPSY_PASSWORD }}</password>
</server>
</servers>
</settings>
"@
New-Item -ItemType Directory -Force -Path "$HOME/.m2"
$xml | Set-Content "$HOME/.m2/settings.xml"
- name: Build and deploy
shell: pwsh
run: |
cd java
$VERSION = mvn help:evaluate -Dexpression=project.version -q -DforceStdout
Write-Host "Detected version: $VERSION"
if ($VERSION -like "*SNAPSHOT*") {
Write-Host "Deploying snapshot version: $VERSION"
mvn deploy -U -B
} else {
Write-Host "Skipping deploy for release version: $VERSION"
mvn install
}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}