-
Notifications
You must be signed in to change notification settings - Fork 1.1k
30 lines (28 loc) · 910 Bytes
/
release.yml
File metadata and controls
30 lines (28 loc) · 910 Bytes
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
name: Release
on:
release:
types:
- prereleased
- released
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Set up JDK 8
uses: actions/setup-java@v4
with:
java-version: 8
distribution: temurin
server-id: default
server-username: MAVEN_USERNAME
server-password: MAVEN_CENTRAL_TOKEN
- name: Set version
run: ./mvnw versions:set -DnewVersion="${{github.event.release.tag_name}}"
# TODO check main's CI status
- name: Deploy with Maven
env:
MAVEN_DEPLOYMENT_REPOSITORY: ${{ secrets.MAVEN_DEPLOYMENT_REPOSITORY }}
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.OSSRH_PASSWORD }}
run: ./mvnw deploy -DaltReleaseDeploymentRepository="$MAVEN_DEPLOYMENT_REPOSITORY" -DskipTests