Skip to content

Commit 582d8fc

Browse files
authored
Update gradle.yml
1 parent 3f91b85 commit 582d8fc

1 file changed

Lines changed: 23 additions & 33 deletions

File tree

.github/workflows/gradle.yml

Lines changed: 23 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,29 @@
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 Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
6-
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
7-
81
name: Java CI with Gradle
92

103
on:
114
push:
125
tags:
13-
- '*'
14-
15-
6+
- '*'
7+
8+
169
jobs:
17-
build-gradle-project:
18-
runs-on: ubuntu-latest
19-
steps:
20-
- name: Checkout project sources
21-
uses: actions/checkout@v3
22-
- name: Set env
23-
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
24-
- name: Setup Gradle
25-
uses: gradle/gradle-build-action@v2
26-
- name: Run build with Gradle Wrapper
27-
run: gradle build
28-
env:
29-
USERNAME: ${{secrets.USERNAME}}
30-
TOKEN: ${{secrets.TOKEN}}
31-
RELEASE_VERSION: ${{env.RELEASE_VERSION}}
32-
- name: Upload artifacts
33-
uses: actions/upload-artifact@v3
34-
with:
35-
name: build-artifacts
36-
path: |
37-
build/libs/*.jar
38-
build/reports/tests/test/index.html
39-
build/reports/jacoco/test/html/index.html
10+
build-gradle-project:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout project sources
14+
uses: actions/checkout@v3
15+
- name: Set env
16+
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
17+
- name: Setup Gradle
18+
uses: gradle/gradle-build-action@v2
19+
- name: Run build with Gradle Wrapper
20+
run: gradle build
21+
env:
22+
USERNAME: ${{secrets.USERNAME}}
23+
TOKEN: ${{secrets.TOKEN}}
24+
RELEASE_VERSION: ${{github.run_number}}
25+
- name: Upload artifacts
26+
uses: actions/upload-artifact@v3
27+
with:
28+
name: build-artifacts
29+
path: build/libs/DiscordBot.jar

0 commit comments

Comments
 (0)