Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: publish

# Auth: npm trusted publishing (OIDC) — requires one-time setup on npmjs.com
# (package Settings > Trusted Publisher: this repo + this workflow).

on:
release:
types: [published]

permissions: {}

jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write # OIDC trusted publishing + provenance
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
- uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0
with:
node-version: 24
registry-url: https://registry.npmjs.org
- name: Check that the release tag matches the package version
run: |
version=$(node -p 'require("./package.json").version')
test "$GITHUB_REF_NAME" = "v$version"
# No install or checks: `check` already gates every push, and publishing
# needs no node_modules — so no registry-delivered code runs with
# id-token authority.
- run: npm publish --ignore-scripts
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,14 @@ change when links actually change.

## Install

Until this package is published to the npm registry, install it from GitHub:
```sh
npm install --save-dev link-cache
```

Or, to install from GitHub rather than the npm registry:

```sh
npm install --save-dev github:chalin/link-cache
npm install --save-dev github:chalin/link-cache#semver:^0.3.0
```

This puts both bins on your project's `PATH`.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "link-cache",
"version": "0.2.1",
"version": "0.3.0",
"description": "Zero-dependency helper CLIs for cached Lychee link-checking: lychee-norm-cache (run + normalize .lycheecache) and refcache (inspect/prune the cache).",
"keywords": [
"lychee",
Expand Down