Build #1
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: Build | |
on: | |
push: | |
tags: | |
- 'v*' | |
branches: | |
- '*' | |
paths: | |
- 'assert/**' | |
- 'core/**' | |
- 'desktop/**' | |
pull_request: | |
tags: | |
- 'v*' | |
branches: | |
- '*' | |
paths: | |
- 'assert/**' | |
- 'core/**' | |
- 'desktop/**' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Check Tags | |
run: | | |
echo "${{ github.ref }}" | |
- name: Clone Repo | |
uses: actions/checkout@v3 | |
- name: Set up JDK 20 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '20' | |
distribution: 'liberica' | |
cache: 'gradle' | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
with: | |
gradle-version: 8.1.1 | |
- name: Execute Gradle build | |
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 }}" | |
prerelease: false | |
title: "${{ github.ref_name }}" | |
files: desktop/build/dist/* |