File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Publish @indexnetwork/cli to npm on every push to main.
2+ # Reads version from package.json — npm silently skips if already published.
3+ #
4+ # Requires: GitHub repo secret INDEX_REPO_TOKEN (npm automation token).
5+ name : Publish
6+
7+ on :
8+ push :
9+ branches :
10+ - main
11+
12+ concurrency :
13+ group : publish-${{ github.ref }}
14+ cancel-in-progress : false
15+
16+ jobs :
17+ publish :
18+ runs-on : ubuntu-latest
19+ name : Build and publish to npm
20+
21+ steps :
22+ - uses : actions/checkout@v4
23+
24+ - uses : oven-sh/setup-bun@v2
25+ with :
26+ bun-version : latest
27+
28+ - uses : actions/setup-node@v4
29+ with :
30+ node-version : 24
31+ registry-url : https://registry.npmjs.org
32+
33+ - name : Install dependencies
34+ run : bun install --frozen-lockfile
35+
36+ - name : Build
37+ run : bun run build
38+
39+ - name : Publish (skip if version already exists)
40+ run : npm publish --access public || true
41+ env :
42+ NODE_AUTH_TOKEN : ${{ secrets.INDEX_REPO_TOKEN }}
You can’t perform that action at this time.
0 commit comments