This repository has been archived by the owner on May 9, 2024. It is now read-only.
Merge pull request #12 from bloxbean/store-0.0.13-beta #6
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 | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
buildAndRelease: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 17 | |
- name: Decode GPG Key | |
run: | | |
mkdir -p ~/.gradle/ | |
echo "${{secrets.SIGNING_KEY}}" > ~/.gradle/secring.gpg.b64 | |
base64 -d ~/.gradle/secring.gpg.b64 > ~/.gradle/secring.gpg | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Build with Gradle | |
run: ./gradlew clean build -Psigning.keyId=${{ secrets.SIGNING_KEY_ID }} -Psigning.password=${{ secrets.SIGNING_PASSWORD }} -Psigning.secretKeyRingFile=$(echo ~/.gradle/secring.gpg) --warn --stacktrace | |
- name: 'Get Version Number' | |
run: | | |
ARTIFACT_VERSION=$(./gradlew properties -q | grep "version:" | awk '{print $2}') | |
echo "VERSION=${ARTIFACT_VERSION}" >> $GITHUB_ENV | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
build/libs/yaci*-${{env.VERSION}}.jar | |
prerelease: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
build-args: APP_VERSION=${{env.VERSION}} | |
tags: bloxbean/yaci-cli:latest,bloxbean/yaci-cli:${{ env.VERSION }} | |
# build: | |
# name: ${{ matrix.version }} on ${{ matrix.os }} | |
# runs-on: ${{ matrix.os }} | |
# strategy: | |
# matrix: | |
# version: [ '22.2.0'] | |
# os: [macos-latest, ubuntu-latest] | |
# include: | |
# - os: 'macos-latest' | |
# label: 'mac' | |
# - os: 'ubuntu-latest' | |
# label: 'linux' | |
# steps: | |
# - uses: actions/checkout@v2 | |
# - uses: graalvm/setup-graalvm@v1 | |
# with: | |
# version: '22.2.0' | |
# java-version: '11' | |
# components: 'native-image' | |
# github-token: ${{ secrets.GITHUB_TOKEN }} | |
# - name: Decode GPG Key | |
# run: | | |
# mkdir -p ~/.gradle/ | |
# echo "${{secrets.SIGNING_KEY}}" > ~/.gradle/secring.gpg.b64 | |
# base64 -d ~/.gradle/secring.gpg.b64 > ~/.gradle/secring.gpg | |
# - name: Grant execute permission for gradlew | |
# run: chmod +x gradlew | |
# - name: Build yaci-cli | |
# run: | | |
# export JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8 | |
# ./gradlew clean build nativeCompile -Psigning.keyId=${{ secrets.SIGNING_KEY_ID }} -Psigning.password=${{ secrets.SIGNING_PASSWORD }} -Psigning.secretKeyRingFile=$(echo ~/.gradle/secring.gpg) --warn --stacktrace | |
# if: runner.os != 'Windows' | |
# - name: 'Get Version Number' | |
# run: | | |
# ARTIFACT_VERSION=$(./gradlew properties -q | grep "version:" | awk '{print $2}') | |
# echo "VERSION=${ARTIFACT_VERSION}" >> $GITHUB_ENV | |
# - name: Rename output file | |
# run: mv build/native/nativeCompile/yaci-cli build/native/nativeCompile/yaci-cli-${{matrix.label}}-amd64-${{env.VERSION}} | |
# - name: Release | |
# uses: softprops/action-gh-release@v1 | |
# if: startsWith(github.ref, 'refs/tags/') | |
# with: | |
# files: | | |
# build/native/nativeCompile/yaci-cli-${{matrix.label}}-amd64-${{env.VERSION}} | |
# prerelease: true |