Fix title typo in index.html and update visual styles for improved la… #2
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
| name: CI/CD – Build & Publish | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - 'v[0-9]+.[0-9]+.[0-9]+' | |
| env: | |
| IMAGE: akoflow/akoflow | |
| jobs: | |
| # ───────────────────────────────────────────── | |
| # Docker image | |
| # ───────────────────────────────────────────── | |
| build-and-push: | |
| name: Build & Push Docker image | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Validate tag format (if tag push) | |
| if: startsWith(github.ref, 'refs/tags/') | |
| run: | | |
| TAG="${GITHUB_REF#refs/tags/}" | |
| if ! echo "$TAG" | grep -qE '^v[0-9]+\.[0-9]+\.[0-9]+$'; then | |
| echo "Tag '$TAG' does not match pattern vX.Y.Z — skipping." | |
| exit 1 | |
| fi | |
| - name: Log in to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build & push image (branch push – latest only) | |
| if: github.ref == 'refs/heads/main' | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| file: Dockerfile | |
| push: true | |
| tags: | | |
| ${{ env.IMAGE }}:latest | |
| - name: Build & push image (version tag) | |
| if: startsWith(github.ref, 'refs/tags/') | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| file: Dockerfile | |
| push: true | |
| tags: | | |
| ${{ env.IMAGE }}:latest | |
| ${{ env.IMAGE }}:${{ github.ref_name }} | |
| # ───────────────────────────────────────────── | |
| # Desktop – macOS | |
| # ───────────────────────────────────────────── | |
| build-desktop-mac: | |
| name: Build Desktop (macOS) | |
| runs-on: macos-latest | |
| if: startsWith(github.ref, 'refs/tags/') | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| cache-dependency-path: desktop/package-lock.json | |
| - name: Install dependencies | |
| working-directory: desktop | |
| run: npm ci | |
| - name: Build Desktop (macOS) | |
| working-directory: desktop | |
| run: npm run dist:mac | |
| - name: Upload macOS artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: desktop-mac | |
| path: desktop/dist/*.dmg | |
| retention-days: 1 | |
| # ───────────────────────────────────────────── | |
| # Desktop – Windows | |
| # ───────────────────────────────────────────── | |
| build-desktop-win: | |
| name: Build Desktop (Windows) | |
| runs-on: windows-latest | |
| if: startsWith(github.ref, 'refs/tags/') | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| cache-dependency-path: desktop/package-lock.json | |
| - name: Install dependencies | |
| working-directory: desktop | |
| run: npm ci | |
| - name: Build Desktop (Windows) | |
| working-directory: desktop | |
| run: npm run dist:win | |
| - name: Upload Windows artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: desktop-win | |
| path: desktop/dist/*.exe | |
| retention-days: 1 | |
| # ───────────────────────────────────────────── | |
| # Desktop – Linux | |
| # ───────────────────────────────────────────── | |
| build-desktop-linux: | |
| name: Build Desktop (Linux) | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.ref, 'refs/tags/') | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| cache-dependency-path: desktop/package-lock.json | |
| - name: Install dependencies | |
| working-directory: desktop | |
| run: npm ci | |
| - name: Build Desktop (Linux) | |
| working-directory: desktop | |
| run: npm run dist:linux | |
| - name: Upload Linux artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: desktop-linux | |
| path: desktop/dist/*.AppImage | |
| retention-days: 1 | |
| # ───────────────────────────────────────────── | |
| # GitHub Release | |
| # ───────────────────────────────────────────── | |
| create-release: | |
| name: Create GitHub Release | |
| runs-on: ubuntu-latest | |
| needs: | |
| - build-and-push | |
| - build-desktop-mac | |
| - build-desktop-win | |
| - build-desktop-linux | |
| if: startsWith(github.ref, 'refs/tags/') | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Get tag name | |
| id: get_tag | |
| run: echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | |
| - name: Get previous tag | |
| id: previous_tag | |
| run: | | |
| PREVIOUS_TAG=$(git describe --tags --abbrev=0 "${{ steps.get_tag.outputs.TAG }}^" 2>/dev/null || echo "") | |
| echo "PREVIOUS_TAG=$PREVIOUS_TAG" >> $GITHUB_OUTPUT | |
| - name: Generate changelog | |
| id: changelog | |
| run: | | |
| { | |
| echo "CHANGELOG<<EOF" | |
| if [ -n "${{ steps.previous_tag.outputs.PREVIOUS_TAG }}" ]; then | |
| git log --pretty=format:"- %s (%h)" \ | |
| "${{ steps.previous_tag.outputs.PREVIOUS_TAG }}..${{ steps.get_tag.outputs.TAG }}" | |
| else | |
| git log --pretty=format:"- %s (%h)" \ | |
| "${{ steps.get_tag.outputs.TAG }}" | |
| fi | |
| echo "" | |
| echo "EOF" | |
| } >> $GITHUB_OUTPUT | |
| - name: Download all Desktop artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: release-artifacts | |
| pattern: desktop-* | |
| merge-multiple: false | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ steps.get_tag.outputs.TAG }} | |
| name: AkôFlow ${{ steps.get_tag.outputs.TAG }} | |
| files: release-artifacts/**/* | |
| body: | | |
| # AkôFlow ${{ steps.get_tag.outputs.TAG }} | |
| ## Changes | |
| ${{ steps.changelog.outputs.CHANGELOG }} | |
| ## Docker Image | |
| ```bash | |
| docker pull ${{ env.IMAGE }}:${{ steps.get_tag.outputs.TAG }} | |
| docker pull ${{ env.IMAGE }}:latest | |
| ``` | |
| ## AkôFlow Desktop | |
| Download the installer for your platform from the assets below: | |
| | Platform | File | | |
| |---|---| | |
| | macOS (Apple Silicon) | `AkôFlow Desktop-*-arm64.dmg` | | |
| | macOS (Intel) | `AkôFlow Desktop-*-x64.dmg` | | |
| | Windows | `AkôFlow Desktop Setup *.exe` | | |
| | Linux | `AkôFlow Desktop-*.AppImage` | | |
| ## Documentation | |
| For more information, visit [AkôFlow documentation](https://github.com/UFFeScience/akoflow/wiki/). | |
| draft: false | |
| prerelease: false | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |