Skip to content

Commit

Permalink
Implement a release workflow (#3)
Browse files Browse the repository at this point in the history
Co-authored-by: Roman Zabaluev <[email protected]>
  • Loading branch information
Narekmat and Haarolean authored Dec 11, 2022
1 parent efa1e32 commit d13871f
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 1 deletion.
46 changes: 46 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
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-smile-serde-${{ steps.build.outputs.version }}.jar
tag: ${{ github.event.release.tag_name }}

- name: Archive JAR
uses: actions/upload-artifact@v3
with:
name: kafkaui-smile-serde-${{ steps.build.outputs.version }}
path: target/kafkaui-smile-serde-${{ steps.build.outputs.version }}.jar
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<dependency>
<groupId>com.provectus</groupId>
<artifactId>kafka-ui-serde-api</artifactId>
<version>0.0.1-SNAPSHOT</version>
<version>1.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down

0 comments on commit d13871f

Please sign in to comment.