Release #44
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Build with Maven | |
run: ./mvnw clean package | |
- name: Get version from pom.xml | |
id: get_version | |
run: echo "::set-output name=version::$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)" | |
- name: Find ZIP file | |
id: find_zip | |
run: echo "::set-output name=zip_path::$(find target -name 'loki-*-dist.zip')" | |
- name: Debug - Check Version and ZIP Path | |
run: | | |
echo "Version: ${{ steps.get_version.outputs.version }}" | |
echo "ZIP Path: ${{ steps.find_zip.outputs.zip_path }}" | |
- name: Create GitHub release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Loki ${{ github.ref }} | |
draft: false | |
prerelease: false | |
- name: Upload ZIP to release | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ${{ steps.find_zip.outputs.zip_path }} | |
asset_name: loki-${{ steps.get_version.outputs.version }}-dist.zip | |
asset_content_type: application/gzip | |
- name: Upload TAR to release | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ${{ steps.find_zip.outputs.zip_path }} | |
asset_name: loki-${{ steps.get_version.outputs.version }}-dist.tar.gz | |
asset_content_type: application/gzip |