release #185
Workflow file for this run
This file contains hidden or 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
| # SPDX-License-Identifier: Apache-2.0 | |
| # Copyright (c) 2018-2026 BioInception PVT LTD | |
| name: release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| permissions: | |
| contents: write | |
| packages: write | |
| jobs: | |
| # ---- Java CLI fat JAR ---- | |
| java-cli: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4.3.1 | |
| - name: Set up JDK 25 | |
| uses: actions/setup-java@v4.8.0 | |
| with: | |
| distribution: temurin | |
| java-version: '25' | |
| cache: maven | |
| - name: Build CLI JAR | |
| run: mvn -U -B -DskipTests=true clean install package | |
| - uses: actions/upload-artifact@v4.6.2 | |
| with: | |
| name: java-jars | |
| path: | | |
| target/smsd-*.jar | |
| !target/smsd-*-sources.jar | |
| !target/smsd-*-javadoc.jar | |
| !target/original-*.jar | |
| # ---- C++ header-only tarball ---- | |
| cpp-headers: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4.3.1 | |
| - name: Package C++ headers | |
| run: | | |
| VERSION=${GITHUB_REF_NAME#v} | |
| tar -czf smsd-cpp-${VERSION}-headers.tar.gz \ | |
| -C cpp/include smsd/ | |
| - uses: actions/upload-artifact@v4.6.2 | |
| with: | |
| name: cpp-headers | |
| path: smsd-cpp-*-headers.tar.gz | |
| # ---- Docker CLI → GHCR ---- | |
| docker-cli: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4.3.1 | |
| - name: Log in to GHCR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and push CLI image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| push: true | |
| tags: | | |
| ghcr.io/${{ github.repository_owner }}/smsd:${{ github.ref_name }} | |
| ghcr.io/${{ github.repository_owner }}/smsd:latest | |
| # ---- Upload artefacts to existing GitHub Release ---- | |
| publish: | |
| needs: [java-cli, cpp-headers, docker-cli] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/download-artifact@v4.3.0 | |
| with: | |
| name: java-jars | |
| path: dist | |
| - uses: actions/download-artifact@v4.3.0 | |
| with: | |
| name: cpp-headers | |
| path: dist | |
| - name: List artefacts | |
| run: find dist -type f | sort | |
| - name: Upload assets to release | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| gh release upload "${{ github.ref_name }}" dist/smsd-*.jar dist/smsd-cpp-*-headers.tar.gz \ | |
| --repo "${{ github.repository }}" --clobber || true |