-
Notifications
You must be signed in to change notification settings - Fork 4
40 lines (39 loc) · 1.25 KB
/
release-build.yml
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
# Releases a new minor / major version from the HEAD of the main branch
name: Release Build
on:
workflow_dispatch:
inputs:
version:
description: The version to tag the release with, e.g., 1.2.0, 1.2.1-alpha.1
required: true
jobs:
build:
name: Build and release
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-java@v2
with:
distribution: temurin
java-version: 21
- uses: gradle/gradle-build-action@v2
with:
arguments: |
build
-Prelease.version=${{ github.event.inputs.version }}
- uses: gradle/gradle-build-action@v2
name: Publish artifacts
with:
arguments: |
final
closeAndReleaseSonatypeStagingRepository
-Prelease.version=${{ github.event.inputs.version }}
env:
GRGIT_USER: ${{ github.actor }}
GRGIT_PASS: ${{ secrets.GITHUB_TOKEN }}
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
MAVEN_GPG_PRIVATE_KEY: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
MAVEN_GPG_PUBLIC_KEY: ${{ secrets.MAVEN_GPG_PUBLIC_KEY }}