Skip to content

Commit

Permalink
feat(cicd): create automatic release
Browse files Browse the repository at this point in the history
  • Loading branch information
tchiotludo committed May 15, 2022
1 parent b23e459 commit 7645ef3
Showing 1 changed file with 9 additions and 48 deletions.
57 changes: 9 additions & 48 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,56 +98,17 @@ jobs:
with:
package-dir: 'client/package.json'

- name: Create Release
id: create_release
uses: actions/create-release@latest
# GitHub Release
- name: Create GitHub release
uses: "marvinpinto/action-automatic-releases@latest"
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: true
prerelease: true
body: |
${{ steps.changelog.outputs.changelog }}
# Upload Jar / Tar / Zip
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./docker/app/akhq.jar
asset_name: akhq.jar
asset_content_type: application/java-archive

- name: Upload Release Tar
id: upload-release-tar
uses: actions/upload-release-asset@v1
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./build/distributions/akhq.tar
asset_name: akhq.tar
asset_content_type: application/x-tar

- name: Upload Release Zip
id: upload-release-zip
uses: actions/upload-release-asset@v1
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./build/distributions/akhq.zip
asset_name: akhq.zip
asset_content_type: application/zip
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
build/libs/*-all.jar
build/distributions/akhq-*.tar
build/distributions/akhq-*.zip
# Docker
- name: Set up QEMU
Expand Down

0 comments on commit 7645ef3

Please sign in to comment.