diff --git a/.github/workflows/tag.yaml b/.github/workflows/tag.yaml new file mode 100644 index 000000000..e2b5aba03 --- /dev/null +++ b/.github/workflows/tag.yaml @@ -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 }}