Changed default addresses/ports for official server #14
This file contains hidden or 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: Compile Example Servers | |
| env: | |
| ARTIFACT_NAME: 'ExampleServers' | |
| HELLO_PATH: 'Examples/Hello World/Server' | |
| REALTIME_PATH: 'Examples/Realtime/Server' | |
| TTT_PATH: 'Examples/Tic Tac Toe/Server' | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| paths: | |
| - 'Examples/Hello World/Server/**' | |
| - 'Examples/Realtime/Server/**' | |
| - 'Examples/Tic Tac Toe/Server/**' | |
| pull_request: | |
| branches: [ "main" ] | |
| paths: | |
| - 'Examples/Hello World/Server/**' | |
| - 'Examples/Realtime/Server/**' | |
| - 'Examples/Tic Tac Toe/Server/**' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Build 'Hello World' with Ant | |
| run: ant -noinput -buildfile '${{ env.HELLO_PATH }}/build.xml' | |
| - name: Build 'Realtime' with Ant | |
| run: ant -noinput -buildfile '${{ env.REALTIME_PATH }}/build.xml' | |
| - name: Build 'Tic Tac Toe' with Ant | |
| run: ant -noinput -buildfile '${{ env.TTT_PATH }}/build.xml' | |
| - name: Move files | |
| run: | | |
| mkdir ${{ env.ARTIFACT_NAME }} | |
| find "${{ env.HELLO_PATH }}" -maxdepth 1 -name '*.jar' -exec mv '{}' ${{ env.ARTIFACT_NAME }} \; | |
| find "${{ env.REALTIME_PATH }}" -maxdepth 1 -name '*.jar' -exec mv '{}' ${{ env.ARTIFACT_NAME }} \; | |
| find "${{ env.TTT_PATH }}" -maxdepth 1 -name '*.jar' -exec mv '{}' ${{ env.ARTIFACT_NAME }} \; | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.ARTIFACT_NAME }} | |
| path: ${{ env.ARTIFACT_NAME }}/* |