Mindustry/.github/workflows/deployment.yml

62 lines
2.0 KiB
YAML
Raw Normal View History

2020-11-20 06:53:02 +07:00
name: Deployment
on:
push:
tags:
- 'v*'
jobs:
buildJava14:
runs-on: ubuntu-latest
steps:
2020-11-20 07:27:21 +07:00
- uses: actions/checkout@v2
2020-11-20 06:53:02 +07:00
- name: Set up JDK 14
uses: actions/setup-java@v1
with:
java-version: 14
- name: Create artifacts
run: |
2020-11-23 05:34:49 +07:00
./gradlew desktop:dist server:dist core:javadoc -Pbuildversion=${GITHUB_REF:1}
2020-11-20 06:53:02 +07:00
- name: Update docs
run: |
cd ../
git config --global user.email "cli@github.com"
git config --global user.name "Github Actions"
2020-11-20 06:53:02 +07:00
git clone --depth=1 https://github.com/MindustryGame/docs.git
cp -a Mindustry/core/build/docs/javadoc/. docs/
cd docs
git add .
git commit -m "Update ${GITHUB_REF:1}"
2020-11-20 07:39:40 +07:00
git push https://Anuken:${{ secrets.API_TOKEN_GITHUB }}@github.com/MindustryGame/docs
2020-11-20 06:53:02 +07:00
cd ../Mindustry
2020-11-20 21:13:36 +07:00
- name: Add Arc release
run: |
git clone --depth=1 --branch=master https://github.com/Anuken/Arc ../Arc
cd ../Arc
git tag ${GITHUB_REF}
git push https://Anuken:${{ secrets.API_TOKEN_GITHUB }}@github.com/Anuken/Arc ${GITHUB_REF};
cd ../Mindustry
2020-11-20 06:53:02 +07:00
- name: Update F-Droid build string
run: |
git clone --depth=1 --branch=master https://github.com/Anuken/MindustryBuilds ../MindustryBuilds
cd ../MindustryBuilds
echo "Updating version to ${GITHUB_REF:1}"
echo versionName=6-fdroid-${GITHUB_REF:1}$'\n'versionCode=${GITHUB_REF:1} > version_fdroid.txt
git add .
git commit -m "Updating to build ${GITHUB_REF:1}"
cd ../Mindustry
- name: Upload client artifacts
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: desktop/libs/Mindustry.jar
tag: ${{ github.ref }}
- name: Upload server artifacts
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: server/libs/server-release.jar
tag: ${{ github.ref }}