Skip to content

Commit

Permalink
Fixed skill issue regarding CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
0xTas committed Apr 12, 2024
1 parent 9d8bdfd commit 31f0493
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 35 deletions.
42 changes: 18 additions & 24 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle

Expand All @@ -21,29 +17,27 @@ jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read

steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'

# Configure Gradle for optimal use in GiHub Actions, including caching of downloaded dependencies.
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
- name: Setup Gradle
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0

- name: Build with Gradle Wrapper
run: ./gradlew build

- uses: "marvinpinto/action-automatic-releases@latest"
with:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'

# Configure Gradle for optimal use in GiHub Actions, including caching of downloaded dependencies.
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
- name: Setup Gradle
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0

- name: Build with Gradle Wrapper
run: ./gradlew build

- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: '${{ secrets.GITHUB_TOKEN }}'
automatic_release_tag: latest
automatic_release_tag: "latest-1.20.4"
prerelease: true
title: "1.20.4 Dev Build"
files: |
Expand Down
36 changes: 25 additions & 11 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,33 @@
name: Build Pull Request
on: pull_request
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle

name: Java CI with Gradle

on: [pull_request]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: adopt
- name: Build
java-version: '17'
distribution: 'temurin'

# Configure Gradle for optimal use in GiHub Actions, including caching of downloaded dependencies.
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
- name: Setup Gradle
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0

- name: Build with Gradle Wrapper
run: ./gradlew build
- name: Upload artifacts
uses: actions/[email protected]

- name: Upload PR Artifact
uses: actions/upload-artifact@v4
with:
name: build-artifacts
path: build/libs
name: pull-request-build
path: build/libs/

0 comments on commit 31f0493

Please sign in to comment.