Skip to content

Commit 395d5d8

Browse files
authored
Migrate to dual releases and packages
1 parent 5dd643d commit 395d5d8

File tree

1 file changed

+30
-18
lines changed

1 file changed

+30
-18
lines changed

.github/workflows/gradle.yml

Lines changed: 30 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,41 @@
1-
name: Build with Gradle (Semver Releases)
1+
# This workflow will build a Java project with Gradle
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
3+
4+
name: Java CI with Gradle
25

36
on:
4-
push:
7+
push:
58
tags: v*
9+
workflow_dispatch:
610

711
jobs:
812
build:
13+
name: Gradle Build and Publish
914
runs-on: ubuntu-latest
15+
1016
steps:
11-
- uses: actions/checkout@v2
17+
- uses: actions/checkout@v2
18+
- name: Caches
19+
uses: burrunan/gradle-cache-action@v1
20+
- name: Set up JDK 1.8
21+
uses: actions/setup-java@v1
22+
with:
23+
java-version: 1.8
24+
- name: Grant execute permission for gradlew
25+
run: chmod +x gradlew
26+
- name: Build with Gradle
27+
run: ./gradlew publish
28+
env:
29+
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
- name: Add Artifact
32+
uses: actions/upload-artifact@v2
33+
with:
34+
name: libs
35+
path: build/libs/*.jar
1236

13-
- name: Set up JDK 1.8
14-
uses: actions/setup-java@v1
15-
with:
16-
java-version: 1.8
17-
18-
- name: Build with Gradle
19-
run: ./gradlew build
20-
21-
- name: Add Artifact
22-
uses: actions/upload-artifact@v2
23-
with:
24-
name: libs
25-
path: build/libs/*.jar
26-
2737
release:
38+
name: Make Release
2839
runs-on: ubuntu-latest
2940
needs: build
3041
steps:
@@ -33,7 +44,7 @@ jobs:
3344
with:
3445
name: libs
3546
path: buildfiles
36-
47+
3748
- name: Create Release
3849
uses: "marvinpinto/action-automatic-releases@latest"
3950
with:
@@ -44,3 +55,4 @@ jobs:
4455
CHANGELOG.txt
4556
LICENSE.txt
4657
buildfiles/*
58+

0 commit comments

Comments
 (0)