63 lines
1.5 KiB
YAML
63 lines
1.5 KiB
YAML
name: build_all
|
|
|
|
on:
|
|
push:
|
|
branches: [ "main" ]
|
|
pull_request:
|
|
branches: [ "main" ]
|
|
|
|
jobs:
|
|
build-server:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Setup .NET
|
|
uses: actions/setup-dotnet@v3
|
|
with:
|
|
dotnet-version: 8.0.x
|
|
|
|
- name: Build
|
|
run: cd minecraft-launcher-server && chmod +x ./publish.sh && ./publish.sh
|
|
|
|
- name: Upload artifacts
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: minecraft-launcher-server
|
|
path: minecraft-launcher-server/bin/publish/
|
|
|
|
build-client:
|
|
runs-on: windows-2019
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Setup .NET
|
|
uses: actions/setup-dotnet@v3
|
|
with:
|
|
dotnet-version: 8.0.x
|
|
|
|
- name: Build
|
|
run: cd minecraft-launcher-client && .\publish.bat
|
|
|
|
- name: Upload artifacts
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: minecraft-launcher-client
|
|
path: minecraft-launcher-client/bin/publish/
|
|
|
|
deploy-to-server:
|
|
needs: [ build-server, build-client ]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Download artifacts
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: assets
|
|
- name: Upload files
|
|
env:
|
|
SSHPASS: ${{secrets.SSH_PASSWORD}}
|
|
run: sshpass -e rsync --archive --compress --verbose --stats -e ssh . ${{secrets.SSH_DESTINATION}} 2>&1 | grep
|
|
-v debug1
|