Doc Update #10
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 | |
on: | |
push: | |
tags: | |
- 'v*' | |
branches: | |
- 'v*' | |
paths: | |
- 'assets/**' | |
- 'core/**' | |
- 'desktop/**' | |
pull_request: | |
tags: | |
- 'v*' | |
branches: | |
- 'v*' | |
paths: | |
- 'assets/**' | |
- 'core/**' | |
- 'desktop/**' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Check Ref | |
run: | | |
echo "Current ref: ${{ github.ref }}" | |
- name: Clone Repo | |
uses: actions/checkout@v3 | |
- name: Setup JavaJDK | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'liberica' | |
cache: 'gradle' | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
with: | |
gradle-version: 8.1.1 | |
- name: Execute Gradle Tasks | |
run: gradle clean distAll | |
- name: Upload Exe | |
uses: actions/upload-artifact@v3 | |
if: ${{ ! startsWith(github.ref, 'refs/tags/') }} | |
with: | |
name: ArkPets.exe | |
path: desktop/build/dist/*.exe | |
- name: Upload Zip | |
uses: actions/upload-artifact@v3 | |
if: ${{ ! startsWith(github.ref, 'refs/tags/') }} | |
with: | |
name: ArkPets.zip | |
path: desktop/build/dist/*.zip | |
- name: Upload Jar | |
uses: actions/upload-artifact@v3 | |
if: ${{ ! startsWith(github.ref, 'refs/tags/') }} | |
with: | |
name: ArkPets.jar | |
path: desktop/build/dist/*.jar | |
- name: Publish Release | |
uses: marvinpinto/action-automatic-releases@latest | |
if: ${{ startsWith(github.ref, 'refs/tags/') }} | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
automatic_release_tag: "${{ github.ref_name }}" | |
draft: false | |
prerelease: false | |
title: "${{ github.ref_name }}" | |
files: desktop/build/dist/* |