Skip to content

Merge pull request #13 from Intsights/releases/release-v8.11.0 #50

Merge pull request #13 from Intsights/releases/release-v8.11.0

Merge pull request #13 from Intsights/releases/release-v8.11.0 #50

Workflow file for this run

name: Maven Package
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Load Java version
id: java_version
shell: bash
run: |
java_version=$(cat ./es-java-version)
if [[ "${java_version}" =~ ^[0-9]{1,3}$ ]]; then
echo "java_version=${java_version}" >> $GITHUB_OUTPUT
fi
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: "${{ steps.java_version.outputs.java_version }}"
distribution: 'temurin'
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: false
- name: Get version from tag name
id: get_version
run: |
version=$(echo ${{ github.ref }} | sed -nr 's/^refs\/tags\/v([0-9]{0,4}\.[0-9]{0,4}\.[0-9]{0,4})(\.[0-9]{0,4}){0,3}$/\1/p')
extra_version=$(echo ${{ github.ref }} | sed -nr 's/^refs\/tags\/v[0-9]{0,4}\.[0-9]{0,4}\.[0-9]{0,4}((\.[0-9]{0,4}){0,3})$/\1/p')
echo "version=${version}" >> $GITHUB_OUTPUT
echo "extra_version=${extra_version}" >> $GITHUB_OUTPUT
- name: Upload Release Asset
id: upload_release_asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./target/releases/analysis-homoglyph-${{ steps.get_version.outputs.version }}.zip
asset_name: analysis-homoglyph-${{ steps.get_version.outputs.version }}${{ steps.get_version.outputs.extra_version }}.zip
asset_content_type: application/zip