External Postgres support (#79) #47
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: Build and Release Yaci CLI Zip | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
buildAndPush: | |
strategy: | |
matrix: | |
os: ["ubuntu-20.04", "macos-14"] | |
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.2' | |
native-image-job-reports: 'true' | |
- name: Get Tag from version file | |
run: | | |
TAG=$(grep "tag=" config/version | cut -d'=' -f2) | |
echo "TAG=${TAG}" >> $GITHUB_ENV | |
- name: Grant execute permission for gradlew | |
working-directory: applications/cli | |
run: chmod +x gradlew | |
- name: Copy CI specific native-image properties | |
working-directory: applications/cli | |
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: Build with Gradle | |
working-directory: applications/cli | |
run: ./gradlew --no-daemon -i -Pversion=${{ env.TAG }} clean build nativeCompile cliZip | |
- name: Copy artifacts | |
working-directory: applications/cli | |
run: mv build/yaci-cli-${{ env.TAG }}.zip build/yaci-cli-${{ env.TAG }}-${{ env.os_prefix }}-${{ runner.arch }}.zip | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
./applications/cli/build/yaci-cli-${{ env.TAG }}-${{ env.os_prefix }}-${{ runner.arch }}.zip | |
prerelease: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |