Files
pastel-wasm/.gitea/workflows/publish.yml
Sebastian Krüger de18e007a6
Some checks failed
CI / test (push) Failing after 10m13s
Build and Publish to npm / build-and-publish (push) Has been cancelled
feat: initial release of pastel-wasm v0.1.0
🎨 WebAssembly color manipulation library

Features:
-  Color parsing (hex, rgb, hsl, named colors)
- 🎨 Color manipulation (lighten, darken, saturate, desaturate)
- 🌈 Color generation (random, gradients, palettes)
-  Accessibility (colorblind simulation, contrast, WCAG)
- 📏 Color distance (CIE76, CIEDE2000)
- 🎯 Color spaces (RGB, HSL, HSV, Lab, LCH)
- 🏷️  148 CSS/X11 named colors

Bundle size: 132KB
Performance: ~0.1ms per operation

🤖 Generated with Claude Code (https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 07:28:46 +01:00

57 lines
1.5 KiB
YAML

name: Build and Publish to npm
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
build-and-publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
target: wasm32-unknown-unknown
- name: Install wasm-pack
run: |
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
- name: Build WASM package
run: |
wasm-pack build --target bundler --out-dir pkg
- name: Update package.json in pkg
run: |
cd pkg
# wasm-pack generates its own package.json, update it with our settings
npm pkg set name="@valknarthing/pastel-wasm"
npm pkg set repository.type="git"
npm pkg set repository.url="ssh://git@dev.pivoine.art:2222/valknar/pastel-wasm.git"
npm pkg set author="Valknar <valknar@pivoine.art>"
npm pkg set publishConfig.access="public"
npm pkg set publishConfig.provenance=true
- name: Publish to npm with provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
cd pkg
npm publish --provenance --access public