Skip to content

Releasing jar

Releasing jar #8

Workflow file for this run

name: Release
on:
release:
types: [published]
jobs:
release:
runs-on: ubuntu-latest
outputs:
version: ${{steps.build.outputs.version}}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- run: |
git config user.name github-actions
git config user.email [email protected]
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'zulu'
cache: 'maven'
- name: Build with Maven
id: build
run: |
mvn -B -ntp versions:set -DnewVersion=${{ github.event.release.tag_name }}
mvn -B -V -ntp clean package -DskipTests
export VERSION=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)
echo "version=${VERSION}" >> $GITHUB_OUTPUT
- name: Upload files to a GitHub release
uses: svenstaro/[email protected]
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/kafkaui-glue-serde-${{ steps.build.outputs.version }}-jar-with-dependencies.jar
tag: ${{ github.event.release.tag_name }}
- name: Archive JAR
uses: actions/upload-artifact@v3
with:
name: kafkaui-glue-serde-${{ steps.build.outputs.version }}-jar-with-dependencies.jar
path: target/kafkaui-glue-serde-${{ steps.build.outputs.version }}-jar-with-dependencies.jar