Skip to content

Commit 7dd2ab3

Browse files
committed
Fix GitHub Actions
1 parent 7e83277 commit 7dd2ab3

File tree

1 file changed

+24
-38
lines changed

1 file changed

+24
-38
lines changed

.github/workflows/main.yml

Lines changed: 24 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,32 @@
1-
# This workflow uses actions that are not certified by GitHub.
2-
# They are provided by a third-party and are governed by
3-
# separate terms of service, privacy policy, and support
4-
# documentation.
5-
# This workflow will build a package using Gradle and then publish it to GitHub packages when a release is created
6-
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#Publishing-using-gradle
7-
8-
name: Gradle Package
1+
name: "Actions"
92

103
on:
114
push:
125
branches:
13-
- master
6+
- "master"
147

158
jobs:
16-
build:
17-
18-
runs-on: ubuntu-latest
19-
permissions:
20-
contents: read
21-
packages: write
9+
Build:
10+
name: "Build"
11+
runs-on: "ubuntu-latest"
2212

2313
steps:
24-
- uses: actions/checkout@v2
25-
- name: Set up JDK 11
26-
uses: actions/setup-java@v2
27-
with:
28-
java-version: '11'
29-
distribution: 'adopt'
30-
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
31-
# settings-path: ${{ github.workspace }} # location for the settings.xml file
32-
33-
- name: Build with Gradle
34-
uses: gradle/gradle-build-action@4137be6a8bf7d7133955359dbd952c0ca73b1021
35-
with:
36-
arguments: build
37-
38-
# The USERNAME and TOKEN need to correspond to the credentials environment variables used in
39-
# the publishing section of your build.gradle
40-
- name: Publish to GitHub Packages
41-
uses: gradle/gradle-build-action@4137be6a8bf7d7133955359dbd952c0ca73b1021
42-
with:
43-
arguments: publish
44-
env:
45-
USERNAME: ${{ github.actor }}
46-
TOKEN: ${{ secrets.GITHUB_TOKEN }}
14+
- uses: actions/checkout@v2
15+
- name: Set up JDK 11
16+
uses: actions/setup-java@v2
17+
with:
18+
java-version: 11
19+
distribution: 'adopt'
20+
- name: Grant execute permission for gradlew
21+
run: chmod +x gradlew
22+
- name: Build with Gradle
23+
run: ./gradlew build
24+
- uses: "marvinpinto/action-automatic-releases@latest"
25+
with:
26+
repo_token: "${{ secrets.GITHUB_TOKEN }}"
27+
automatic_release_tag: "latest"
28+
prerelease: true
29+
title: "Development Build"
30+
files: |
31+
LICENSE
32+
build/libs/*.jar

0 commit comments

Comments
 (0)