An educational pure functional programming library in TypeScript
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add CI/CD workflow for Tangled Spindles

+61
+3
.gitignore
··· 32 32 33 33 # Finder (MacOS) folder config 34 34 .DS_Store 35 + 36 + # Local documentation (not committed) 37 + *.local.md
+58
.tangled/workflows/ci.yml
··· 1 + # CI/CD Pipeline for purus-ts 2 + # Runs tests on push, publishes to npm on version tags 3 + 4 + when: 5 + - event: ["push"] 6 + branch: ["main"] 7 + - event: ["push"] 8 + tag: ["v*"] 9 + - event: ["pull_request"] 10 + branch: ["main"] 11 + 12 + engine: "nixery" 13 + 14 + clone: 15 + depth: 1 16 + 17 + dependencies: 18 + nixpkgs/nixpkgs-unstable: 19 + - bun 20 + - nodejs 21 + - coreutils 22 + - bash 23 + 24 + environment: 25 + CI: "true" 26 + 27 + steps: 28 + - name: "Install dependencies" 29 + command: | 30 + BUN=$(echo /nix/store/*bun*/bin/bun) 31 + $BUN install --frozen-lockfile 32 + 33 + - name: "Type check" 34 + command: | 35 + BUN=$(echo /nix/store/*bun*/bin/bun) 36 + $BUN run type-check 37 + 38 + - name: "Run tests" 39 + command: | 40 + BUN=$(echo /nix/store/*bun*/bin/bun) 41 + $BUN test 42 + 43 + - name: "Build" 44 + command: | 45 + BUN=$(echo /nix/store/*bun*/bin/bun) 46 + $BUN run build 47 + 48 + - name: "Publish to npm (on version tag)" 49 + command: | 50 + if [[ "${SPINDLE_REF}" == refs/tags/v* ]]; then 51 + echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc 52 + npm publish --access public 53 + echo "Published $(node -p "require('./package.json').version") to npm" 54 + else 55 + echo "Skipping publish (not a version tag)" 56 + fi 57 + environment: 58 + NPM_TOKEN: "${NPM_TOKEN}"