Skip to content

Release

Release #15

Workflow file for this run

# yaml-language-server: $schema=https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/github-workflow.json
name: Release
on:
workflow_dispatch:
inputs:
stage:
description: 'the stage of the version'
required: true
default: 'final'
type: choice
options:
- rc
- final
scope:
description: 'the scope of the version'
required: true
default: 'patch'
type: choice
options:
- patch
- minor
- major
jobs:
build:
name: Publish
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Clone repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Java
uses: actions/setup-java@v2
with:
distribution: "temurin"
java-version: "17"
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Retrieve module version from Reckon
run: echo "VERSION_NAME=$(${{github.workspace}}/gradlew -q clfPrintVersion -Preckon.stage=${{ inputs.stage }} -Preckon.scope=${{ inputs.scope }})" >> $GITHUB_OUTPUT
id: retrieve_version
- name: Publish module version to Github Step Summary
run: |
echo "# ${{steps.retrieve_version.outputs.VERSION_NAME}}" >> $GITHUB_STEP_SUMMARY
- name: Publish Plugin + Create Tag
uses: gradle/gradle-build-action@v2
with:
arguments: check reckonTagPush publishPlugin -Preckon.stage=${{ inputs.stage }} -Preckon.scope=${{ inputs.scope }}
cache-read-only: true
env:
GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }}
GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }}
- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
if: always()
with:
report_paths: '**/build/test-results/test/TEST-*.xml'
include_passed: true
- name: Create Release on GitHub
uses: softprops/action-gh-release@v1
with:
name: ${{steps.retrieve_version.outputs.VERSION_NAME}}
tag_name: ${{steps.retrieve_version.outputs.VERSION_NAME}}
generate_release_notes: true
append_body: true