-
Notifications
You must be signed in to change notification settings - Fork 0
97 lines (79 loc) · 2.41 KB
/
release.yml
File metadata and controls
97 lines (79 loc) · 2.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: Release
on:
push:
tags:
- 'v*.*.*'
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn -B clean package --no-transfer-progress --file pom.xml
- name: Run tests
run: mvn -B test --no-transfer-progress --file pom.xml
publish-maven:
name: Publish to Maven Central
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Configure Git
run: |
git config --global user.email "action@github.com"
git config --global user.name "GitHub Action"
- name: Build with Maven
run: mvn -B clean package --no-transfer-progress --file pom.xml
- name: Publish to Maven Central
run: mvn -B deploy --no-transfer-progress --file pom.xml
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
github-release:
name: Create GitHub Release
runs-on: ubuntu-latest
needs: test
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
name: Release ${{ github.ref_name }}
body: |
Version ${{ github.ref_name }} has been released to Maven Central.
## Installation
### Maven
```xml
<dependency>
<groupId>ai.wavespeed</groupId>
<artifactId>wavespeed-java-sdk</artifactId>
<version>${{ github.ref_name }}</version>
</dependency>
```
### Gradle
```groovy
implementation 'ai.wavespeed:wavespeed-java-sdk:${{ github.ref_name }}'
```
## Changes
See commit history for changes in this release.
draft: false
prerelease: false