Skip to content

Commit a51f803

Browse files
authored
Merge pull request #2 from TheKodeToad/create-release
Release workflow
2 parents eb5e839 + ec50464 commit a51f803

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

.github/workflows/gradle.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jobs:
2828
uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1
2929
with:
3030
arguments: build
31+
cache-read-only: ${{ github.ref != 'refs/heads/main' }}
3132
- name: Upload Artifacts
3233
uses: actions/upload-artifact@v3
3334
with:

.github/workflows/release.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Release
2+
on:
3+
push:
4+
tags:
5+
- "*"
6+
workflow_dispatch:
7+
8+
jobs:
9+
release:
10+
name: "Tagged Release"
11+
runs-on: "ubuntu-latest"
12+
13+
steps:
14+
- uses: actions/checkout@v3
15+
16+
- uses: actions-ecosystem/action-get-latest-tag@v1
17+
id: get-latest-tag
18+
19+
- uses: gradle/wrapper-validation-action@v1
20+
- uses: actions/setup-java@v3
21+
if: "github.ref == 'refs/tags/${{ steps.get-latest-tag.outputs.tag }}'"
22+
with:
23+
distribution: "temurin"
24+
java-version: 17
25+
cache: 'gradle'
26+
27+
- uses: gradle/gradle-build-action@v2
28+
with:
29+
arguments: build
30+
cache-read-only: true
31+
32+
- uses: "marvinpinto/action-automatic-releases@latest"
33+
with:
34+
repo_token: "${{ secrets.GH_TOKEN }}"
35+
prerelease: false
36+
draft: true
37+
files: build/libs/*

0 commit comments

Comments
 (0)