Skip to content

Commit 19699dd

Browse files
committedMar 28, 2021
changes
2 parents 3b657a6 + b60a575 commit 19699dd

File tree

3 files changed

+56
-10
lines changed

3 files changed

+56
-10
lines changed
 

‎.github/workflows/gradle_build.yaml

-10
This file was deleted.

‎.github/workflows/gradle_release.yaml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Build and Release
2+
3+
on:
4+
push:
5+
# Sequence of patterns matched against refs/heads
6+
branches:
7+
# Push events on main branch
8+
- main
9+
10+
jobs:
11+
build_game:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2 # Checkout repo to remote machine
15+
- name: Set up OpenJDK13
16+
uses: actions/setup-java@v1
17+
with:
18+
java-version: '13'
19+
20+
- name: Build Game
21+
run: |
22+
cd $GRADLE_DIR
23+
chmod +x ./gradlew
24+
./gradlew --stacktrace build
25+
ls -al
26+
env:
27+
GRADLE_DIR: 'source' # Modify this to wherever './gradlew' is
28+
29+
- name: Automatic Release # note the path for the files on this one
30+
uses: marvinpinto/action-automatic-releases@v1.1.1
31+
with:
32+
repo_token: "${{ secrets.GITHUB_TOKEN }}"
33+
automatic_release_tag: "latest"
34+
prerelease: false
35+
title: "Latest Build of Game"
36+
files: |
37+
./source/desktop/build/libs/*.jar
+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Clean up releases # So we don't overuse our quota
2+
3+
on:
4+
workflow_run:
5+
workflows: ["Build and Release"]
6+
types: [completed]
7+
8+
jobs:
9+
delete_old_release:
10+
runs-on: ubuntu-latest
11+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
12+
steps:
13+
- uses: dev-drprasad/delete-older-releases@v0.1.0
14+
with:
15+
keep_latest: 3 # keep the most recent 3 releases; make this 0 to delete all, or 1 to keep recent
16+
delete_tags: true
17+
env:
18+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19+

0 commit comments

Comments
 (0)
Please sign in to comment.