Skip to content

Commit 7367051

Browse files
committed
Add release workflow
1 parent d8ed520 commit 7367051

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Release CI
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
timeout-minutes: 45
12+
13+
steps:
14+
- name: Checkout Project
15+
uses: actions/checkout@v4.0.0
16+
17+
- name: Validate Gradle Wrapper
18+
uses: gradle/wrapper-validation-action@v1.1.0
19+
20+
- name: Configure JDK
21+
uses: actions/setup-java@v3.12.0
22+
with:
23+
distribution: 'temurin'
24+
java-version: '17'
25+
cache: gradle
26+
27+
- name: Grant execute permission for gradlew
28+
run: chmod +x gradlew
29+
30+
- name: Create Release
31+
id: create_release
32+
uses: actions/create-release@v1.1.4
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
with:
36+
tag_name: ${{ github.ref }}
37+
release_name: ${{ github.ref }}
38+
draft: true
39+
prerelease: false
40+
41+
- name: Publish Gradle Plugin
42+
env:
43+
GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }}
44+
GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }}
45+
run: ./gradlew -Dgradle.publish.key=$GRADLE_PUBLISH_KEY -Dgradle.publish.secret=$GRADLE_PUBLISH_SECRET publishPlugins

0 commit comments

Comments
 (0)