bump mindustry to v146 #63
This file contains 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: Build Push Changes | |
on: push | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set Android SDK tools | |
run: echo "$ANDROID_HOME/build-tools/30.0.3" >> $GITHUB_PATH | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: 'gradle' | |
- name: Get short commit hash | |
run: echo "SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV | |
- name: Build MultiCrafter | |
run: | | |
chmod +x gradlew | |
./gradlew :main:deploy | |
./gradlew distInjection | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: MultiCrafterMod | |
path: main/build/tmp/deploy/*.jar | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: MultiCrafterLibDist | |
path: build/tmp/distInjection/*.zip | |
upload: | |
needs: build | |
if: ${{ contains(github.event.head_commit.message,'[release]') }} | |
runs-on: ubuntu-latest | |
env: | |
GH_REPO: ${{ github.repository }} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/download-artifact@v2 | |
with: | |
name: MultiCrafterMod | |
path: out | |
- uses: actions/download-artifact@v2 | |
with: | |
name: MultiCrafterLibDist | |
path: out | |
- name: Retrieve meta | |
id: retrieveMeta | |
run: | | |
chmod +x gradlew | |
./gradlew retrieveMeta | |
- name: Create release | |
if: ${{ steps.retrieveMeta.outputs.tag_exist == 'false' }} | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
HEADER: ${{ steps.retrieveMeta.outputs.header }} | |
VERSION: ${{ steps.retrieveMeta.outputs.version }} | |
TAG_EXIST: ${{ steps.retrieveMeta.outputs.tag_exist }} | |
run: | | |
gh release create "$VERSION" --title "$HEADER" --notes-file "$GITHUB_WORKSPACE/.github/workflows/ReleaseMessage.md" out/* | |
- name: Update release file if possible | |
if: always() | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
VERSION: ${{ steps.retrieveMeta.outputs.version }} | |
run: | | |
gh release upload "$VERSION" out/* --clobber |