Skip to content

Fix indentation for npm publish shell command #17

Fix indentation for npm publish shell command

Fix indentation for npm publish shell command #17

Workflow file for this run

# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created

Check failure on line 1 in .github/workflows/npm-publish.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/npm-publish.yml

Invalid workflow file

(Line: 39, Col: 9): There's not enough info to determine what you meant. Add one of these properties: run, shell, uses, with, working-directory
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
name: npm publish
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- run: npm ci
- run: npm test
npm-publish:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
registry-url: https://registry.npmjs.org/
- run: |
for package_dir in packages/*; \
do \
if [ -d "$package_dir" ] && [[ "$package_dir" == "packages/aws-durable-execution-sdk-js-testing" || "$package_dir" == "packages/aws-durable-execution-sdk-js" ]]; then \
echo "$package_dir" \
cd "$package_dir" \
echo "Publishing package in $package_dir" \
npm publish --access public \
cd ../.. \
fi \
done
- env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
shell: bash