Skip to content

Merge branch 'master' into yzh #69

Merge branch 'master' into yzh

Merge branch 'master' into yzh #69

Workflow file for this run

name: build
on: [push, workflow_dispatch]
jobs:
buildJar:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up PATH
run: |
echo "${ANDROID_HOME}/build-tools/34.0.0" >> $GITHUB_PATH
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Build mod jar
run: ./gradlew deploy
- name: Upload built jar file
uses: actions/upload-artifact@v2
with:
name: ${{ github.event.repository.name }}
path: build/libs/${{ github.event.repository.name }}.jar
# - name: Get version
# id: get_version
# run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
# - name: Create Release
# id: create_release
# uses: actions/create-release@v1
# if: startsWith(github.ref, 'refs/tags/')
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# tag_name: ${{ steps.get_version.outputs.VERSION }}
# release_name: ${{ steps.get_version.outputs.VERSION }}
# draft: false
# prerelease: false
# - name: Upload Release Asset
# uses: actions/upload-release-asset@v1
# if: startsWith(github.ref, 'refs/tags/')
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }}
# asset_path: build/libs/${{ github.event.repository.name }}.jar
# asset_name: ${{ github.event.repository.name }}.${{ steps.get_version.outputs.VERSION }}-143.jar
# asset_content_type: application/java-archive
buildWindows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Build mod jar
run: ./gradlew jar