Add monochrome logo SVG for CipherLogger #10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish to npm | |
| on: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| id-token: write | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| registry-url: https://registry.npmjs.org | |
| cache: pnpm | |
| - name: Update npm | |
| run: npm install -g npm@latest | |
| - name: Check versions | |
| run: | | |
| echo "Node: $(node --version)" | |
| echo "npm: $(npm --version)" | |
| echo "pnpm: $(pnpm --version)" | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build | |
| run: pnpm run build | |
| - name: Publish | |
| run: | | |
| NAME=$(node -p "require('./package.json').name") | |
| VERSION=$(node -p "require('./package.json').version") | |
| echo "Package: ${NAME}" | |
| echo "Version: ${VERSION}" | |
| if npm view "${NAME}@${VERSION}" version >/dev/null 2>&1; then | |
| echo "Skipping publish: ${NAME}@${VERSION} already exists on npm" | |
| exit 0 | |
| fi | |
| npm publish --access public |