Skip to content

Release version 2.4.1 #16

Release version 2.4.1

Release version 2.4.1 #16

Workflow file for this run

name: Release New Version
run-name: Release version ${{github.event.inputs.release_version}}
on:
workflow_dispatch:
inputs:
release_version:
description: 'Release version (MAJOR.MINOR.PATCH, eg. 2.3.4)'
required: true
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: Validation for release version
run: |

Check failure on line 17 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / Release New Version

Invalid workflow file

The workflow is not valid. .github/workflows/release.yml (Line: 17, Col: 14): Unexpected symbol: '}'. Located at position 25 within expression: github.event.inputs.tag } is a version in the correct format according to semver (MAJOR.MINOR.PATCH)" echo "${{ github.event.inputs.release_version
echo "Validating that release version ${{ github.event.inputs.tag } is a version in the correct format according to semver (MAJOR.MINOR.PATCH)"
echo "${{ github.event.inputs.release_version }}" | grep -P '^2\.[0-9]+\.[0-9]+$'
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- run: |
echo "Release version ${{ github.event.inputs.release_version }}!"
- name: Set projects Maven version to GitHub Action GUI set version
run: mvn versions:set "-DnewVersion=${{ github.event.inputs.release_version }}"
# - name: Deploy to Github packages
# run: mvn --batch-mode clean deploy -Pgithub
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Deploy to Maven Central Repository
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: maven
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_SIGNING_KEY }}
- name: Set projects Maven version to GitHub Action GUI set version
run: mvn versions:set "-DnewVersion=${{ github.event.inputs.release_version }}"
- name: Publish to the Maven Central Repository
run: mvn --batch-mode clean deploy -Possrh
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
# MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
- name: Generate changelog
id: changelog
uses: metcalfc/[email protected]
with:
mytoken: "${{ secrets.GITHUB_TOKEN }}"
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.event.inputs.release_version }}
release_name: ${{ github.event.inputs.release_version }}
body: |
### Things that changed in this release
${{ steps.changelog.outputs.changelog }}
draft: false
prerelease: false