Skip to content

generate-tag

generate-tag #68

Workflow file for this run

name: generate-tag
on:
workflow_dispatch:
branches: [main]
inputs:
stage:
description: 'Stage'
required: true
default: 'auto'
type: choice
options:
- 'alpha'
- 'beta'
- 'rc'
- 'final'
- 'auto'
scope:
description: 'Scope'
required: true
default: 'auto'
type: choice
options:
- 'minor'
- 'major'
- 'auto'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Java
uses: actions/[email protected]
with:
distribution: 'zulu'
java-version: 11
- name: Build with Gradle
uses: gradle/[email protected]
with:
arguments: build -x spotlessCheck "-Psemver.scope=${{ github.event.inputs.scope }}" "-Psemver.stage=${{ github.event.inputs.stage }}"
- name: Stop Gradle daemons
run: ./gradlew --stop
generate-tag:
runs-on: ubuntu-latest
needs:
- build
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.TOKEN_GITHUB_ACTION }}
- name: Set up Java
uses: actions/[email protected]
with:
distribution: 'zulu'
java-version: 11
- name: Generate Tag
uses: gradle/[email protected]
with:
arguments: createSemverTag "-Psemver.scope=${{ github.event.inputs.scope }}" "-Psemver.stage=${{ github.event.inputs.stage }}"
- name: Push changes to tag
run: git push --follow-tags
- name: Stop Gradle daemons
run: ./gradlew --stop