Skip to content

Commit

Permalink
Create gradle-publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
windy664 authored Feb 11, 2025
1 parent 7b887d6 commit 8658cb7
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/gradle-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Java CI with Gradle

on:
push:
paths:
- '**/**' # 监控所有文件的更改
pull_request:
paths:
- '**/**' # 监控所有文件的更改

jobs:
build:

runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'adopt'
cache: gradle

- name: Grant execute permission for gradlew
run: chmod +x gradlew

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

- name: Archive JAR file
uses: actions/upload-artifact@v4
with:
path: build/libs/*.jar

0 comments on commit 8658cb7

Please sign in to comment.