Skip to content

release

release #94

Workflow file for this run

name: release
on:
workflow_dispatch:
inputs:
versionName:
description: 'Version Name'
required: true
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
- name: Set up Java 17 for running Gradle
uses: actions/setup-java@v3.13.0
with:
distribution: temurin
java-version: 17
- name: Grant Permission to Execute Gradle
run: chmod +x gradlew
- name: Build with Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: build
- name: Publish Library
run: |
echo "Publishing library🚀"
./gradlew publishToMavenCentral
echo "Published✅"
env:
ORG_GRADLE_PROJECT_VERSION_NAME: ${{ github.event.inputs.versionName }}
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_SECRET }}
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.GPG_ID }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_PASSWORD }}
- name: Create and push tag
run: |
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
git tag -a $TAG -m "Release v$TAG"
git push origin $TAG
env:
TAG: ${{ github.event.inputs.versionName }}
- name: Build Changelog
id: github_release
uses: mikepenz/release-changelog-builder-action@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Release
uses: mikepenz/action-gh-release@v0.2.0-a03
with:
body: ${{steps.github_release.outputs.changelog}}
tag_name: ${{ github.event.inputs.versionName }}