Skip to content

Publish Artifacts

Publish Artifacts #33

Workflow file for this run

name: Publish Artifacts
on:
release:
types: [ released, prereleased ]
jobs:
publish_artifacts:
name: Publish Artifacts
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
#- name: Build and Push Native Image
# env:
# QUARKUS_CONTAINER_IMAGE_BUILD: true
# QUARKUS_CONTAINER_IMAGE_PUSH: true
# QUARKUS_PACKAGE_TYPE: native
# QUARKUS_NATIVE_COMPRESSION_LEVEL: 9
# run: ./gradlew build
#- name: Copy Linux Binary to Temporary Folder
# run: cp app/build/tsa-*-runner $RUNNER_TEMP/tsa-linux-amd64
#- name: Upload Linux Binary as Release Asset
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ github.event.release.upload_url }}
# asset_path: ${{ runner.temp }}/tsa-linux-amd64
# asset_name: tsa-linux-amd64
# asset_content_type: application/octet-stream
- name: Build and Push JVM Images
env:
QUARKUS_CONTAINER_IMAGE_BUILD: true
QUARKUS_CONTAINER_IMAGE_PUSH: true
QUARKUS_PACKAGE_TYPE: jar
QUARKUS_DOCKER_BUILDX_PLATFORM: linux/amd64,linux/arm64
run: ./gradlew clean assemble
- name: Update Docker Hub description
if: ${{ github.event.action == 'released' }}
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: dnl50/tsa-server
short-description: ${{ github.event.repository.description }}