Create tag.yaml (#2459)
This commit is contained in:
41
.github/workflows/tag.yaml
vendored
Normal file
41
.github/workflows/tag.yaml
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
name: Tag
|
||||
|
||||
on:
|
||||
# enable running the workflow manually
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
description: 'Tag'
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up JDK & Maven Central credentials
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: 21
|
||||
cache: 'maven'
|
||||
|
||||
- name: Cache local Maven repository
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-maven-
|
||||
|
||||
- name: Tag
|
||||
run: |
|
||||
git tag -a ${TAG} -m "Release version ${TAG}"
|
||||
git push origin ${TAG}
|
||||
env:
|
||||
TAG: ${{ github.event.inputs.tag }}
|
||||
Reference in New Issue
Block a user