Skip to content

- Moved permissions into the job #165

- Moved permissions into the job

- Moved permissions into the job #165

Workflow file for this run

name: Release

Check failure on line 1 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/release.yml

Invalid workflow file

(Line: 11, Col: 7): Unexpected value 'content'
on:
release:
types: [published]
jobs:
release_to_npm:
name: Release to npm
runs-on: ubuntu-latest
permissions:
content: read
id-token: write
steps:
- uses: actions/checkout@v6
- name: Use Node.js 22.x
uses: actions/setup-node@v6
with:
node-version: 22.x
cache: 'npm'
cache-dependency-path: 'package-lock.json'
- run: npm i -g npm@9
- run: npm ci
- run: npm run build-serial
env:
NODE_OPTIONS: --max_old_space_size=4096
- run: npm test
- run: npm run lint
- name: Determine npm tag based on release version
id: get_npm_tag
run: |
TAG_NAME="${{ github.ref_name }}"
NPM_TAG_VALUE="latest" # Default tag
if [[ "$TAG_NAME" == *alpha* || "$TAG_NAME" == *beta* || "$TAG_NAME" == *pre* ]]; then
NPM_TAG_VALUE="next"
fi
echo "NPM_TAG=${NPM_TAG_VALUE}" >> $GITHUB_ENV
echo "Determined NPM_TAG: ${NPM_TAG_VALUE}"
- run: npx nx release publish --tag=$NPM_TAG --provenance