Tag #25
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tag | |
on: | |
workflow_dispatch: | |
inputs: | |
release_version: | |
description: 'Release version' | |
required: true | |
jobs: | |
tag: | |
name: Tag | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/hotfix/v') | |
steps: | |
- name: Checkout project | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.CI_CD_TOKEN }} | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
cache: maven | |
- name: Set up Node.js 22.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '22.x' | |
- name: Import GPG key | |
uses: crazy-max/ghaction-import-gpg@v6 | |
with: | |
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
passphrase: ${{ secrets.GPG_PASSPHRASE }} | |
git_user_signingkey: true | |
git_commit_gpgsign: true | |
- name: Create tag | |
run: | | |
npm --no-git-tag-version version ${{ github.event.inputs.release_version }} | |
git add package.json | |
mvn versions:set -DnewVersion=${{ github.event.inputs.release_version }} | |
git add pom.xml | |
git commit -s -m "Prepare release v${{ github.event.inputs.release_version }}" | |
git push | |
git tag v${{ github.event.inputs.release_version }} -s -m "Create tag v${{ github.event.inputs.release_version }}" | |
git push origin v${{ github.event.inputs.release_version }} | |
- name: Update next version | |
run: | | |
mvn versions:set -DnextSnapshot=true | |
git add pom.xml | |
npm --no-git-tag-version version $(mvn help:evaluate -Dexpression=project.version -q -DforceStdout | cut -d '-' -f 1)-next | |
git add package.json | |
git commit -s -m "Prepare next snapshot version [skip ci]" | |
git push |