Skip to content

Updating to build 146 #4388

Updating to build 146

Updating to build 146 #4388

Workflow file for this run

name: Build Artifacts
on:
push:
tags:
- '*'
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 16
uses: actions/setup-java@v1
with:
java-version: 16
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Set up keystore
run: |
echo "${{ secrets.KEYSTORE_BASE64 }}" > keystore.txt
base64 --decode keystore.txt > bekeystore.jks
- name: Create artifacts
env:
keystore_password: ${{ secrets.KEYSTORE_PASSWORD_SECRET }}
keystore_alias_password: ${{ secrets.KEYSTORE_PASSWORD_SECRET }}
keystore_alias: frog
run: |
git clone --depth=1 --branch=master https://github.com/Anuken/Mindustry
cd Mindustry
echo "BODY=$(git rev-parse HEAD)" >> $GITHUB_ENV
sed -i 's/applicationId "io.anuke.mindustry"/applicationId "io.anuke.mindustry.be"/g' android/build.gradle
sed -i 's/"io.anuke.mindustry"/"io.anuke.mindustry.be"/g' android/AndroidManifest.xml
sed -i 's/Mindustry/Mindustry BE/g' android/res/values/strings.xml
./gradlew pack
./gradlew desktop:dist server:dist android:assembleRelease -Pbuildversion=${RELEASE_VERSION} -PversionType=bleeding-edge --stacktrace
mv desktop/build/libs/Mindustry.jar desktop/build/libs/Mindustry-BE-Desktop-${RELEASE_VERSION}.jar
mv server/build/libs/server-release.jar server/build/libs/Mindustry-BE-Server-${RELEASE_VERSION}.jar
mv android/build/outputs/apk/release/android-release.apk android/build/outputs/apk/release/Mindustry-BE-Android-${RELEASE_VERSION}.apk
- name: Upload desktop artifacts
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: Mindustry/desktop/build/libs/Mindustry-BE-Desktop-${{ env.RELEASE_VERSION }}.jar
tag: ${{ github.ref }}
body: ${{ env.BODY }}
- name: Upload server artifacts
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: Mindustry/server/build/libs/Mindustry-BE-Server-${{ env.RELEASE_VERSION }}.jar
tag: ${{ github.ref }}
- name: Upload Android artifacts
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: Mindustry/android/build/outputs/apk/release/Mindustry-BE-Android-${{ env.RELEASE_VERSION }}.apk
tag: ${{ github.ref }}