mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-22 05:41:11 +07:00
separate itch and steam uploads from packr build
This commit is contained in:
81
.github/workflows/buildAndDeploy.yml
vendored
81
.github/workflows/buildAndDeploy.yml
vendored
@ -162,15 +162,13 @@ jobs:
|
|||||||
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
|
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
mkdir deploy
|
mv android/build/outputs/apk/release/Unciv-release-unsigned-signed.apk Unciv-signed.apk
|
||||||
ls android/build/outputs/apk/release
|
|
||||||
mv android/build/outputs/apk/release/Unciv-release-unsigned-signed.apk deploy/Unciv-signed.apk
|
|
||||||
|
|
||||||
- name: Upload APK
|
- name: Upload APK
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: UncivAPK
|
name: UncivAPK
|
||||||
path: deploy/Unciv-signed.apk
|
path: Unciv-signed.apk
|
||||||
|
|
||||||
|
|
||||||
## Finalize
|
## Finalize
|
||||||
@ -201,7 +199,7 @@ jobs:
|
|||||||
allow_empty_commits: false
|
allow_empty_commits: false
|
||||||
|
|
||||||
|
|
||||||
Upload-to-itch-io-and-steam:
|
packr-build:
|
||||||
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
|
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: build
|
needs: build
|
||||||
@ -225,30 +223,16 @@ jobs:
|
|||||||
- name: Upload to itch.io
|
- name: Upload to itch.io
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
|
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
|
||||||
env:
|
|
||||||
BUTLER_API_KEY: ${{ secrets.BUTLER_API_KEY }}
|
|
||||||
run: |
|
run: |
|
||||||
wget -q -O butler.zip https://broth.itch.ovh/butler/linux-amd64/LATEST/archive/default
|
|
||||||
unzip butler.zip
|
|
||||||
chmod +x butler
|
|
||||||
|
|
||||||
mkdir -p desktop/build/libs
|
mkdir -p desktop/build/libs
|
||||||
mv Unciv.jar desktop/build/libs
|
mv Unciv.jar desktop/build/libs
|
||||||
|
|
||||||
wget -q -O packr-all-4.0.0.jar https://github.com/libgdx/packr/releases/download/4.0.0/packr-all-4.0.0.jar
|
wget -q -O packr-all-4.0.0.jar https://github.com/libgdx/packr/releases/download/4.0.0/packr-all-4.0.0.jar
|
||||||
wget -q -O jre-linux-64.tar.gz https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.11%2B9/OpenJDK11U-jre_x64_linux_hotspot_11.0.11_9.tar.gz
|
wget -q -O jre-linux-64.tar.gz https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.11%2B9/OpenJDK11U-jre_x64_linux_hotspot_11.0.11_9.tar.gz
|
||||||
./gradlew desktop:packrLinux64
|
./gradlew desktop:packrLinux64
|
||||||
./butler push deploy/Unciv-Linux64.zip yairm210/unciv:Linux64 --userversion ${{needs.Build.outputs.version_tag}}
|
|
||||||
|
|
||||||
# MacOS bundles correctly but does not run as intended, see https://github.com/yairm210/Unciv/issues/4970
|
|
||||||
# Disabled until this can be checked by sommeone who actually has a Mac computer
|
|
||||||
# wget -q -O jre-macOS.tar.gz https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.11%2B9/OpenJDK11U-jre_x64_mac_hotspot_11.0.11_9.tar.gz
|
|
||||||
# ./gradlew desktop:packrMacOS
|
|
||||||
# ./butler push deploy/Unciv-MacOS.zip yairm210/unciv:MacOS --userversion ${{needs.Build.outputs.version_tag}}
|
|
||||||
|
|
||||||
wget -q -O jdk-windows-64.zip https://github.com/ojdkbuild/ojdkbuild/releases/download/java-1.8.0-openjdk-1.8.0.232-1.b09/java-1.8.0-openjdk-1.8.0.232-1.b09.ojdkbuild.windows.x86_64.zip
|
wget -q -O jdk-windows-64.zip https://github.com/ojdkbuild/ojdkbuild/releases/download/java-1.8.0-openjdk-1.8.0.232-1.b09/java-1.8.0-openjdk-1.8.0.232-1.b09.ojdkbuild.windows.x86_64.zip
|
||||||
./gradlew desktop:packrWindows64
|
./gradlew desktop:packrWindows64
|
||||||
./butler push deploy/Unciv-Windows64.zip yairm210/unciv:Windows64 --userversion ${{needs.Build.outputs.version_tag}}
|
|
||||||
|
|
||||||
- name: Upload packed zips
|
- name: Upload packed zips
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
@ -258,14 +242,46 @@ jobs:
|
|||||||
deploy/Unciv-Windows64.zip
|
deploy/Unciv-Windows64.zip
|
||||||
deploy/Unciv-Linux64.zip
|
deploy/Unciv-Linux64.zip
|
||||||
|
|
||||||
|
Upload-to-itch:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: packr-build
|
||||||
|
|
||||||
|
- name: Download packed zips
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: UncivDeploymentZips
|
||||||
|
|
||||||
|
- name: Upload to itch.io
|
||||||
|
continue-on-error: true
|
||||||
|
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
|
||||||
|
env:
|
||||||
|
BUTLER_API_KEY: ${{ secrets.BUTLER_API_KEY }}
|
||||||
|
run: |
|
||||||
|
wget -q -O butler.zip https://broth.itch.ovh/butler/linux-amd64/LATEST/archive/default
|
||||||
|
unzip butler.zip
|
||||||
|
chmod +x butler
|
||||||
|
|
||||||
|
./butler push Unciv-Linux64.zip yairm210/unciv:Linux64 --userversion ${{needs.Build.outputs.version_tag}}
|
||||||
|
./butler push Unciv-Windows64.zip yairm210/unciv:Windows64 --userversion ${{needs.Build.outputs.version_tag}}
|
||||||
|
|
||||||
|
Upload-to-steam:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: packr-build
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: Download packed zips
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: UncivDeploymentZips
|
||||||
|
|
||||||
- name: Unzip zips for steam deployment
|
- name: Unzip zips for steam deployment
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
|
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
mkdir steam
|
mkdir steam
|
||||||
unzip deploy/Unciv-Windows64.zip -d steam/Unciv-Windows64
|
unzip Unciv-Windows64.zip -d steam/Unciv-Windows64
|
||||||
unzip deploy/Unciv-Linux64.zip -d steam/Unciv-Linux64
|
unzip Unciv-Linux64.zip -d steam/Unciv-Linux64
|
||||||
|
|
||||||
- name: Steam deploy
|
- name: Steam deploy
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
@ -285,29 +301,22 @@ jobs:
|
|||||||
releaseBranch: release
|
releaseBranch: release
|
||||||
|
|
||||||
Finalize:
|
Finalize:
|
||||||
needs: Upload-to-itch-io-and-steam
|
needs: packr-build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Download JAR
|
- name: Download all artifacts
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
# See 'Upload JAR' step in 'build' job
|
|
||||||
with:
|
|
||||||
name: |
|
|
||||||
UncivJar
|
|
||||||
UncivDeploymentZips
|
|
||||||
UncivAPK
|
|
||||||
UncivServer
|
|
||||||
|
|
||||||
- name: consolidate deploy folder
|
- name: consolidate deploy folder
|
||||||
run: |
|
run: |
|
||||||
mkdir deploy
|
mkdir deploy
|
||||||
mv Unciv.jar deploy
|
mv UncivJar/Unciv.jar deploy
|
||||||
mv Unciv-Windows64.zip deploy
|
mv UncivJar/linuxFilesForJar.zip deploy
|
||||||
mv Unciv-Linux64.zip deploy
|
mv UncivDeploymentZips/Unciv-Windows64.zip deploy
|
||||||
mv Unciv-signed.apk deploy
|
mv UncivDeploymentZips/Unciv-Linux64.zip deploy
|
||||||
mv UncivServer.jar deploy
|
mv UncivAPK/Unciv-signed.apk deploy
|
||||||
mv linuxFilesForJar.zip deploy
|
mv UncivServer/UncivServer.jar deploy
|
||||||
|
|
||||||
- name: Check if this is a real release or a test version, for Github release
|
- name: Check if this is a real release or a test version, for Github release
|
||||||
id: check-version-tag
|
id: check-version-tag
|
||||||
|
Reference in New Issue
Block a user