Skip to content

Update project version to 0.1.0-rc7-mvn-test #44

Update project version to 0.1.0-rc7-mvn-test

Update project version to 0.1.0-rc7-mvn-test #44

Workflow file for this run

name: Publish package to the Maven Central Repository
#on:
# release:
# types: [created]
on:
push:
tags:
- 'v*'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 21
uses: actions/setup-java@v2
with:
java-version: '21'
distribution: 'liberica'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew clean build
- 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: Publish package
run: ./gradlew publish -Psigning.keyId=${{ secrets.SIGNING_KEY_ID }} -Psigning.password=${{ secrets.SIGNING_PASSWORD }} -Psigning.secretKeyRingFile=$(echo ~/.gradle/secring.gpg) --warn --stacktrace
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
- 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: |
applications/all/build/libs/yaci-store-all-${{env.VERSION}}.jar
applications/utxo-indexer/build/libs/yaci-store-utxo-indexer-${{env.VERSION}}.jar
applications/aggregation-app/build/libs/yaci-store-aggregation-app-${{env.VERSION}}.jar
applications/admin/build/libs/yaci-store-admin-${{env.VERSION}}.jar
config/application.properties
config/application-aggr.properties
prerelease: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Close And Release Repository
# run: ./gradlew closeAndReleaseRepository
# env:
# MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
# MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push yaci-store-all docker image
uses: docker/build-push-action@v5
with:
file: ./Dockerfile
context: .
platforms: linux/amd64,linux/arm64
push: true
target: yaci-store-all
build-args: |
TARGET=yaci-store-all
APP_VERSION=${{env.VERSION}}
tags: bloxbean/yaci-store-all:${{ env.VERSION }}
- name: Build and push yaci-store-aggregation-app docker image
uses: docker/build-push-action@v4
with:
file: ./Dockerfile
context: .
platforms: linux/amd64,linux/arm64
push: true
target: yaci-store-aggregation-app
build-args: |
TARGET=yaci-store-aggregation-app
APP_VERSION=${{env.VERSION}}
tags: bloxbean/yaci-store-aggregation-app:${{ env.VERSION }}
- name: Build and push yaci-store-utxo-indexer docker image
uses: docker/build-push-action@v4
with:
file: ./Dockerfile
context: .
platforms: linux/amd64,linux/arm64
push: true
target: yaci-store-utxo-indexer
build-args: |
TARGET=yaci-store-utxo-indexer
APP_VERSION=${{env.VERSION}}
tags: bloxbean/yaci-store-utxo-indexer:${{ env.VERSION }}
- name: Build and push yaci-store-admin docker image
uses: docker/build-push-action@v4
with:
file: ./Dockerfile
context: .
platforms: linux/amd64,linux/arm64
push: true
target: yaci-store-admin
build-args: |
TARGET=yaci-store-admin
APP_VERSION=${{env.VERSION}}
tags: bloxbean/yaci-store-admin:${{ env.VERSION }}