Skip to content

Commit 8ff3d6e

Browse files
committed
feat: replace workflow for gradle
1 parent 207ceaa commit 8ff3d6e

File tree

4 files changed

+89
-83
lines changed

4 files changed

+89
-83
lines changed

.github/workflows/build-test.yml

Lines changed: 0 additions & 48 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
workflow_dispatch:
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
build:
18+
name: Build with Java 17
19+
runs-on: ubuntu-latest
20+
timeout-minutes: 15
21+
22+
steps:
23+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
24+
- uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
25+
with:
26+
distribution: "adopt"
27+
java-version: 17
28+
29+
- name: Setup Gradle
30+
uses: gradle/actions/setup-gradle@017a9effdb900e5b5b2fddfb590a105619dca3c3 # v4.4.2
31+
32+
- name: Build with Gradle
33+
run: ./gradlew build
34+
35+
- name: Upload a Build Artifact
36+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
37+
with:
38+
path: build/libs/

.github/workflows/deploy.yml

Lines changed: 0 additions & 35 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: 'Plugin version. ex: x.x.x, x.x.x-SNAPSHOT'
8+
required: true
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
release:
16+
name: Release
17+
runs-on: ubuntu-latest
18+
timeout-minutes: 3
19+
steps:
20+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
21+
- uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
22+
with:
23+
distribution: "adopt"
24+
java-version: 17
25+
26+
- name: Setup Gradle
27+
uses: gradle/actions/setup-gradle@017a9effdb900e5b5b2fddfb590a105619dca3c3 # v4.4.2
28+
29+
- name: Build
30+
run: ./gradlew build
31+
env:
32+
VERSION: ${{ github.event.inputs.version }}
33+
34+
- name: Upload a Build Artifact
35+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
36+
with:
37+
path: build/libs/
38+
39+
- name: Publish to azisaba repo
40+
run: ./gradlew publish
41+
env:
42+
VERSION: ${{ github.event.inputs.version }}
43+
REPO_USERNAME: ${{ secrets.REPO_USERNAME }}
44+
REPO_PASSWORD: ${{ secrets.REPO_PASSWORD }}
45+
46+
- name: Create release
47+
uses: softprops/action-gh-release@6cbd405e2c4e67a21c47fa9e383d020e4e28b836 # v2.3.3
48+
with:
49+
tag_name: ${{ github.event.inputs.version }}
50+
files: build/libs/*.jar
51+
generate_release_notes: true

0 commit comments

Comments
 (0)