Merge main --> dev #49
Workflow file for this run
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: Dev Build | |
on: | |
push: | |
branches: | |
- dev | |
workflow_dispatch: | |
jobs: | |
buildJar: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up PATH | |
run: | | |
echo "${ANDROID_HOME}/build-tools/30.0.1" >> $GITHUB_PATH | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 17.0.7 | |
distribution: oracle | |
cache: gradle | |
- name: Build mod JAR | |
run: chmod +x ./gradlew; ./gradlew deploy | |
- name: Get current version | |
run: | | |
version=$(${{github.workspace}}/gradlew -q printVersion) | |
echo "version=$version" >> $GITHUB_ENV | |
- name: Upload built JAR file | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ github.event.repository.name }}-${{ env.version }} | |
path: build/libs/${{ github.event.repository.name }}-${{ env.version }}.jar | |
updateVersion: | |
permissions: | |
contents: write | |
if: ${{ github.repository == 'Aeyama-Mod/aeyama' }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Build Version Update | |
run: | | |
python .github/workflows/scripts/version.py | |
git config --global user.name "Github Actions" | |
git config --global user.email "[email protected]" | |
git add . | |
git commit -m 'Automatic Build Version Update' | |
git push |