Bug fixes #27
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
| name: Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*.*.*' | |
| permissions: | |
| contents: write | |
| packages: write | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: false | |
| env: | |
| CARGO_TERM_COLOR: always | |
| REGISTRY: ghcr.io | |
| IMAGE_NAME: ${{ github.repository }} | |
| jobs: | |
| # ── Tauri desktop builds ────────────────────────────────────────────────── | |
| tauri: | |
| timeout-minutes: 60 | |
| name: Tauri (${{ matrix.platform }}) | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - platform: ubuntu-latest | |
| os-label: linux | |
| arch: x64 | |
| - platform: windows-latest | |
| os-label: windows | |
| arch: x64 | |
| - platform: macos-latest | |
| os-label: macos | |
| arch: universal | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Checkout private engine | |
| id: engine | |
| env: | |
| SSH_KEY: ${{ secrets.LIBSTEGCORE_DEPLOY_KEY }} | |
| shell: bash | |
| run: | | |
| if [ -n "$SSH_KEY" ]; then | |
| mkdir -p ~/.ssh | |
| echo "$SSH_KEY" > ~/.ssh/id_ed25519 | |
| chmod 600 ~/.ssh/id_ed25519 | |
| ssh-keyscan github.com >> ~/.ssh/known_hosts 2>/dev/null | |
| git submodule update --init --recursive | |
| echo "cargo_features=engine,custom-protocol" >> "$GITHUB_OUTPUT" | |
| else | |
| mkdir -p libstegcore/src | |
| printf '[package]\nname = "stegcore-engine"\nversion = "4.0.0-beta.1"\nedition = "2021"\n\n[lib]\nname = "stegcore_engine"\n' > libstegcore/Cargo.toml | |
| touch libstegcore/src/lib.rs | |
| echo "cargo_features=custom-protocol" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Install Linux system deps | |
| if: matrix.platform == 'ubuntu-latest' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| libglib2.0-dev \ | |
| libgtk-3-dev \ | |
| libwebkit2gtk-4.1-dev \ | |
| libappindicator3-dev \ | |
| librsvg2-dev \ | |
| patchelf \ | |
| libssl-dev \ | |
| pkg-config | |
| - name: Add macOS universal targets | |
| if: matrix.platform == 'macos-latest' | |
| run: | | |
| rustup target add aarch64-apple-darwin | |
| rustup target add x86_64-apple-darwin | |
| - name: Use Node.js 24 | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '24' | |
| cache: npm | |
| cache-dependency-path: frontend/package-lock.json | |
| - name: Install frontend dependencies | |
| working-directory: frontend | |
| run: npm ci | |
| - name: Build frontend | |
| working-directory: frontend | |
| run: npm run build | |
| - name: Cache Cargo | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target/ | |
| key: ${{ runner.os }}-cargo-release-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Build Tauri app (Linux/Windows) | |
| if: matrix.platform != 'macos-latest' | |
| uses: tauri-apps/tauri-action@v0 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tagName: ${{ github.ref_name }} | |
| releaseName: Stegcore ${{ github.ref_name }} | |
| releaseBody: | | |
| See [CHANGELOG.md](https://github.com/${{ github.repository }}/blob/main/CHANGELOG.md) for details. | |
| releaseDraft: true | |
| prerelease: false | |
| args: -- --no-default-features --features ${{ steps.engine.outputs.cargo_features }} | |
| - name: Build Tauri app (macOS universal) | |
| if: matrix.platform == 'macos-latest' | |
| uses: tauri-apps/tauri-action@v0 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| with: | |
| tagName: ${{ github.ref_name }} | |
| releaseName: Stegcore ${{ github.ref_name }} | |
| releaseBody: | | |
| See [CHANGELOG.md](https://github.com/${{ github.repository }}/blob/main/CHANGELOG.md) for details. | |
| releaseDraft: true | |
| prerelease: false | |
| args: --target universal-apple-darwin -- --no-default-features --features ${{ steps.engine.outputs.cargo_features }} | |
| # ── Docker multi-arch image ─────────────────────────────────────────────── | |
| docker: | |
| timeout-minutes: 30 | |
| name: Docker (amd64 + arm64) | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - 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 GitHub Container Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Extract metadata | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
| tags: | | |
| type=semver,pattern={{version}} | |
| type=semver,pattern={{major}}.{{minor}} | |
| type=raw,value=latest | |
| - name: Build and push | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| file: docker/Dockerfile | |
| platforms: linux/amd64,linux/arm64 | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| # ── Checksums ───────────────────────────────────────────────────────────── | |
| checksums: | |
| name: Generate checksums | |
| needs: tauri | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Download release assets | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| gh release download ${{ github.ref_name }} \ | |
| --repo ${{ github.repository }} \ | |
| --dir ./assets | |
| - name: Generate SHA-256 checksums | |
| run: | | |
| cd assets | |
| sha256sum * > stegcore-${{ github.ref_name }}-checksums.sha256 | |
| cat stegcore-${{ github.ref_name }}-checksums.sha256 | |
| - name: Upload checksums | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| gh release upload ${{ github.ref_name }} \ | |
| ./assets/stegcore-${{ github.ref_name }}-checksums.sha256 \ | |
| --repo ${{ github.repository }} |