Skip to content

Rename workflow for more accurate description #1

Rename workflow for more accurate description

Rename workflow for more accurate description #1

Workflow file for this run

name: Build and Release Yaci Store Native Zip
on:
push:
tags:
- 'rel-graal-*'
jobs:
buildAndUpload:
strategy:
matrix:
# os: ["ubuntu-20.04", "macos-14"]
os: ["ubuntu-20.04", "macOS", "macos-13"]
profile: ["n2c", ""]
runs-on: ${{ matrix.os }}
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
FORCE_COLOR: 1
steps:
- uses: actions/checkout@v4
- uses: graalvm/setup-graalvm@v1
with:
java-version: '21'
distribution: 'graalvm'
github-token: ${{ secrets.GITHUB_TOKEN }}
version: '21.0.4'
native-image-job-reports: 'true'
- name: Get Version from gradle.properties
run: |
VERSION=$(grep "version=" gradle.properties | cut -d'=' -f2 | xargs)
echo "VERSION=${VERSION}" >> $GITHUB_ENV
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Copy CI specific native-image properties
if: runner.os == 'Linux'
run: |
echo "os_prefix=linux" >> $GITHUB_ENV
- name: MacOS specific env
if: runner.os == 'macOS'
run: |
echo "os_prefix=macos" >> $GITHUB_ENV
- name: Set lowercase architecture
run: echo "arch=$(echo ${{ runner.arch }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
- name: Set Profile Suffix
run: |
if [ -n "${{ matrix.profile }}" ]; then
echo "PROFILE_SUFFIX=-${{ matrix.profile }}" >> $GITHUB_ENV
else
echo "PROFILE_SUFFIX=" >> $GITHUB_ENV
fi
- name: Build with Gradle
run: ./gradlew --no-daemon -i -Pversion=${{ env.VERSION }} -Pprofile=${{ matrix.profile }} clean cliZip
- name: Copy artifacts
run: mv applications/all/build/output/yaci-store-*.zip applications/all/build/output/yaci-store-${{ env.VERSION }}-${{ env.os_prefix }}-${{ env.arch }}${{ env.PROFILE_SUFFIX }}.zip
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
applications/all/build/output/yaci-store-${{ env.VERSION }}-${{ env.os_prefix }}-${{ env.arch }}${{ env.PROFILE_SUFFIX }}.zip
prerelease: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}