Skip to content

[editor only] now? #557

[editor only] now?

[editor only] now? #557

Workflow file for this run

# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: SNAPSHOT Build
on:
push:
branches: [ master ]
jobs:
linux:
if: "!contains(github.event.head_commit.message, 'cd skip')"
runs-on: ubuntu-latest
needs: [windows, macOS]
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Setup Eclipse Temurin OpenJDK 17
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: 17
- name: Add build info
env:
WORKFLOW_RUN: ${{ github.run_number }}
run: |
echo "build=$WORKFLOW_RUN" >> assets/configs/app.properties
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build JAR dist files
env:
WORKFLOW_RUN: ${{ github.run_number }}
run: ./gradlew dist -PSNAPSHOT=true
- name: Build deb package
env:
WORKFLOW_RUN: ${{ github.run_number }}
run: ./gradlew jpackage -PSNAPSHOT=true
- name: Fix deb file names
run: mv build/jpackage/*.deb Linux.HyperLap2D-SNAPSHOT.deb
- name: Generate build info
env:
WORKFLOW_RUN: ${{ github.run_number }}
run: |
echo "{ \"build\": $WORKFLOW_RUN }" > snapshot.json
- name: Download macOS and Windows Release
uses: actions/[email protected]
- name: Display structure of downloaded files
run: ls -R
- name: Upload deb artifact
uses: actions/[email protected]
with:
name: Linux.HyperLap2D-SNAPSHOT.deb
path: Linux.HyperLap2D-SNAPSHOT.deb
- name: Sync files with production server
uses: appleboy/[email protected]
with:
host: ${{ secrets.DEPLOY_SSH_HOST }}
username: ${{ secrets.DEPLOY_SSH_USERNAME }}
password: ${{ secrets.DEPLOY_SSH_PASSWORD }}
port: ${{ secrets.DEPLOY_SSH_PORT }}
source: "Linux.HyperLap2D-SNAPSHOT.deb,Windows.HyperLap2D-SNAPSHOT.exe/Windows.HyperLap2D-SNAPSHOT.exe,macOS.HyperLap2D-SNAPSHOT.dmg/macOS.HyperLap2D-SNAPSHOT.dmg,snapshot.json"
target: ${{ secrets.DEPLOY_SSH_TARGET_PATH }}
- name: Publish SNAPSHOT artifacts
if: "!contains(github.event.head_commit.message, 'editor only')"
env:
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
run: ./gradlew build publish -PSNAPSHOT=true
windows:
if: "!contains(github.event.head_commit.message, 'cd skip')"
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Setup Eclipse Temurin OpenJDK 17
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: 17
- name: Add build info
env:
WORKFLOW_RUN: ${{ github.run_number }}
run: |
echo "build=$Env:WORKFLOW_RUN" >> assets/configs/app.properties
- name: Build JAR dist files
env:
WORKFLOW_RUN: ${{ github.run_number }}
run: ./gradlew.bat dist -PSNAPSHOT=true
- name: Build exe package
env:
WORKFLOW_RUN: ${{ github.run_number }}
run: ./gradlew.bat jpackage -PSNAPSHOT=true
- name: Fix file names
run: mv build/jpackage/*.exe Windows.HyperLap2D-SNAPSHOT.exe
- name: Upload exe artifact
uses: actions/[email protected]
with:
name: Windows.HyperLap2D-SNAPSHOT.exe
path: Windows.HyperLap2D-SNAPSHOT.exe
macOS:
if: "!contains(github.event.head_commit.message, 'cd skip')"
runs-on: macOS-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Setup Eclipse Temurin OpenJDK 17
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: 17
- name: Add build info
env:
WORKFLOW_RUN: ${{ github.run_number }}
run: |
echo "build=$WORKFLOW_RUN" >> assets/configs/app.properties
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build JAR dist files
env:
WORKFLOW_RUN: ${{ github.run_number }}
run: ./gradlew dist -PSNAPSHOT=true
- name: Build dmg package
env:
WORKFLOW_RUN: ${{ github.run_number }}
run: ./gradlew jpackage -PSNAPSHOT=true
- name: Fix file names
run: mv build/jpackage/*.dmg macOS.HyperLap2D-SNAPSHOT.dmg
- name: Upload dmg artifact
uses: actions/[email protected]
with:
name: macOS.HyperLap2D-SNAPSHOT.dmg
path: macOS.HyperLap2D-SNAPSHOT.dmg