From c072aa6cf90552c861d4d94e7719591ebdf4867b Mon Sep 17 00:00:00 2001 From: zimzaza4 <53421735+zimzaza4@users.noreply.github.com> Date: Sun, 7 Jul 2024 19:22:12 +0800 Subject: [PATCH] Create maven.yml --- .github/workflows/maven.yml | 43 +++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/maven.yml diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml new file mode 100644 index 0000000..3f9290a --- /dev/null +++ b/.github/workflows/maven.yml @@ -0,0 +1,43 @@ +name: Auto Release + +on: + push: + branches: + - main + +jobs: + build: + name: Build + runs-on: ubuntu-20.04 + steps: + - name: Checkout + uses: actions/checkout@v2 + + # Setup JDK + - name: Setup Java JDK + uses: actions/setup-java@v3 + with: + java-version: 17 + distribution: 'zulu' + + - name: Restore Maven cache + uses: skjolber/maven-cache-github-action@v1 + with: + step: restore + + # Build + - name: Build with Maven + run: mvn package + + - name: Save Maven cache + uses: skjolber/maven-cache-github-action@v1 + with: + step: save + - name: Auto release + uses: "marvinpinto/action-automatic-releases@latest" + with: + repo_token: "${{ secrets.GITHUB_TOKEN }}" + automatic_release_tag: latest + prerelease: false + files: | + target/*.jar