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 Nov 3, 2024
1 parent cf10c80 commit ab33141
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/gradle-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
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@v3
with:
name: $name
path: build/libs/*.jar

0 comments on commit ab33141

Please sign in to comment.