mirror of
https://github.com/hanzoai/brand.git
synced 2026-10-23 03:05:28 +00:00
Drop the publish lane that never ran
The package goes out from the release script, not from here: this file has never produced a run on either plane. Co-authored-by: Hanzo Dev <[email protected]>
This commit is contained in:
@@ -1,50 +0,0 @@
|
||||
name: publish
|
||||
|
||||
# Publishes @hanzo/brand when the version in package.json changes on main.
|
||||
# A version already on the registry is skipped, so re-runs are safe.
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths: ['package.json']
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: [linux-amd64]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 24
|
||||
registry-url: https://registry.npmjs.org/
|
||||
- name: Skip if already published
|
||||
id: check
|
||||
run: |
|
||||
NAME=$(jq -r .name package.json)
|
||||
VER=$(jq -r .version package.json)
|
||||
if curl -fsSL "https://registry.npmjs.org/$NAME/$VER" > /dev/null 2>&1; then
|
||||
echo "$NAME@$VER already on registry; skipping"
|
||||
echo "skip=true" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "skip=false" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
# `test` builds dist/ and then gates on the suite — one command for both.
|
||||
# dist/ is gitignored, so publishing without it ships a package whose every
|
||||
# subpath 404s. corepack takes the pnpm version from packageManager.
|
||||
- name: Test
|
||||
if: steps.check.outputs.skip != 'true'
|
||||
run: |
|
||||
corepack enable
|
||||
pnpm install --frozen-lockfile
|
||||
pnpm test
|
||||
- name: Publish
|
||||
if: steps.check.outputs.skip != 'true'
|
||||
# npm, not pnpm: pnpm publish adds git checks a CI checkout fails.
|
||||
# --no-provenance: a token publish 422s without it.
|
||||
run: npm publish --access public --no-provenance
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
Reference in New Issue
Block a user