Skip to content

Merge branch 'classic' into main for v3.0.0-v62 release #17

Merge branch 'classic' into main for v3.0.0-v62 release

Merge branch 'classic' into main for v3.0.0-v62 release #17

name: Publish Releases & Packages
on:
push:
tags:
- 'v*'
workflow_dispatch:
permissions:
contents: write
packages: write
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
jobs:
publish-releases:
name: Compile Native Binaries & ZIP Drop-in
runs-on: ubuntu-22.04
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Java 8
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'temurin'
cache: 'maven'
- name: Compile Native Binaries (Maven)
run: mvn clean package
- name: Package ZIP Drop-in
run: |
mkdir -p release-pkg
# Ignore failures if directories don't exist (e.g., target/dist)
cp -r target/dist/* release-pkg/ || true
cp -r target/lib release-pkg/ || true
cp launch_*.sh release-pkg/ || true
cp -r configs release-pkg/ || true
cp -r scripts release-pkg/ || true
cd release-pkg
zip -r ../OriginalMS-${{ github.ref_name }}.zip .
- name: Upload Release Artifact
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/v')
with:
files: OriginalMS-${{ github.ref_name }}.zip
publish-docker:
name: Publish GitHub Container Package (GHCR)
runs-on: ubuntu-22.04
needs: publish-releases
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Check for Dockerfile
id: check_docker
run: |
if [ -f Dockerfile ]; then
echo "has_docker=true" >> $GITHUB_OUTPUT
else
echo "has_docker=false" >> $GITHUB_OUTPUT
fi
- name: Log in to GitHub Container Registry
if: steps.check_docker.outputs.has_docker == 'true'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
if: steps.check_docker.outputs.has_docker == 'true'
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ghcr.io/biossystem/originalms:latest,ghcr.io/biossystem/originalms:${{ github.ref_name }}