Skip to content

more tests

more tests #42

Workflow file for this run

name: Publish packages
on:
push:
branches:
- master
# Add this at the top level to ensure we have proper permissions
permissions:
contents: write
packages: write # Add this if you're using GitHub Packages
id-token: write # Add this for better security with secrets
jobs:
publish_packages:
runs-on: ubuntu-latest
# Add this to ensure the job only runs if the secret exists
if: ${{ secrets.NPM_TOKEN != '' }}

Check failure on line 18 in .github/workflows/publish.yml

View workflow run for this annotation

GitHub Actions / Publish packages

Invalid workflow file

The workflow is not valid. .github/workflows/publish.yml (Line: 18, Col: 9): Unrecognized named-value: 'secrets'. Located at position 1 within expression: secrets.NPM_TOKEN != ''
steps:
- uses: actions/checkout@v4
- name: Verify Secret Availability
run: |
if [ -z "${{ secrets.NPM_TOKEN }}" ]; then
echo "NPM_TOKEN secret is not set"
exit 1
else
echo "NPM_TOKEN secret is available"
fi
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
registry-url: "https://registry.npmjs.org"
- name: git config
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- name: Configure NPM Authentication
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" > .npmrc
cat .npmrc