Skip to content

Release Build

Release Build #8

Workflow file for this run

# 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 }}