Skip to content
This repository has been archived by the owner on Aug 13, 2024. It is now read-only.

Commit

Permalink
[TBS] update CD workflow to publish gh release with fatjar
Browse files Browse the repository at this point in the history
  • Loading branch information
oguzhanunlu committed Jul 23, 2021
1 parent a8d8ab4 commit 3aa718f
Showing 1 changed file with 24 additions and 6 deletions.
30 changes: 24 additions & 6 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,29 @@ jobs:
distribution: 'adopt'
java-version: '11'

- name: Login to Docker Hub
uses: docker/login-action@v1
- name: Get current version
id: version
run: echo "::set-output name=tag::${GITHUB_REF#refs/tags/}"

- name: Assemble fat jar
run: sbt clean assembly

- name: Create GitHub release & Attach artifacts
uses: softprops/action-gh-release@v1
with:
username: ${{ secrets.GLOBAL_DOCKERHUB_CI_USERNAME }}
password: ${{ secrets.GLOBAL_DOCKERHUB_CI_PASSWORD }}
draft: true
prerelease: ${{ contains(steps.version.outputs.tag, 'rc') }}
name: ${{ steps.version.outputs.tag }}
tag_name: ${{ steps.version.outputs.tag }}
files: target/scala-2.13/blob2stream-${{ steps.version.outputs.tag }}.jar
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# - name: Login to Docker Hub
# uses: docker/login-action@v1
# with:
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}

- name: Publish docker image
run: sbt docker:publish
# - name: Publish docker image
# run: sbt docker:publish

0 comments on commit 3aa718f

Please sign in to comment.