oximg 0.4.2

High-performance image compression: library, CLI, and self-hostable server (PoC).
Documentation
name: Release

on:
  push:
    tags: ["v*"]
  # npm-only re-publish (e.g. after bumping npm/package.json); the
  # crates job is tag-gated.
  workflow_dispatch:

jobs:
  publish:
    if: github.ref_type == 'tag'
    runs-on: ubuntu-latest
    environment: release
    permissions:
      id-token: write # OIDC token exchange for crates.io Trusted Publishing
      contents: read
    steps:
      - uses: actions/checkout@v5
      - name: Install build dependencies
        run: sudo apt-get update && sudo apt-get install -y --no-install-recommends cmake nasm
      - uses: dtolnay/rust-toolchain@stable
      - uses: rust-lang/crates-io-auth-action@v1
        id: auth
      - name: Publish to crates.io
        run: cargo publish
        env:
          CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}

  npm:
    runs-on: ubuntu-latest
    environment: release
    permissions:
      id-token: write # OIDC token exchange for npm Trusted Publishing
      contents: read
    steps:
      - uses: actions/checkout@v5
      - uses: actions/setup-node@v4
        with:
          node-version: 24 # bundles npm >= 11.5.1, required for OIDC publishes
          registry-url: https://registry.npmjs.org
      - name: Publish @oximg/oximg
        working-directory: npm
        run: npm publish --access public