Skip to content

Release latest patch version (#94) #29

Release latest patch version (#94)

Release latest patch version (#94) #29

name: Publish Release
on:
push:
branches:
- stable
paths:
- '**/gradle.properties'
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
steps:
# https://github.com/marketplace/actions/checkout
- uses: actions/checkout@v4
# https://github.com/marketplace/actions/setup-java-jdk
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: temurin
- name: Set gradlew execution permission
run: chmod u+x gradlew
# https://github.com/marketplace/actions/generate-version
- name: Get release version
uses: HardNorth/[email protected]
with:
version-source: file
version-file: gradle.properties
version-file-extraction-pattern: '(?<=version=).+'
# https://github.com/marketplace/actions/semver-parser
- name: Parse release version
uses: apexskier/github-semver-parse@v1
id: semver
with:
version: ${{ env.RELEASE_VERSION }}
# https://github.com/marketplace/actions/gradle-build-action
- name: Build artifacts
uses: gradle/gradle-build-action@v2
with:
arguments: build
# https://github.com/marketplace/actions/create-release
- name: Create release
uses: ncipollo/release-action@v1
with:
name: Gateway ${{ env.RELEASE_VERSION }}
tag: v${{ env.RELEASE_VERSION }}
generateReleaseNotes: true
artifacts: 'build/libs/*.jar'
prerelease: ${{ !!steps.semver.outputs.prerelease }}
token: ${{ secrets.GITHUB_TOKEN }}