Skip to content

Fix npm-publish.yml workflow #65

Fix npm-publish.yml workflow

Fix npm-publish.yml workflow #65

Workflow file for this run

# This workflow builds the package and uploads it to the NPM repository
name: Publish to NPM
# Trigger with every commit on master
on:
push:
branches:
- master
jobs:
build_and_publish_package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Delete node_modules directory
run: rm -rf node_modules
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Copy package.json to dist directory
run: cp package.json dist && sed -i 's/\"main\": \".*\"/\"main\": \"sportlink-to-mailchimp-converter.umd.js\"/' dist/package.json && sed -i 's/\"types\": \".*\"/\"types\": \"sportlink-to-mailchimp-converter.umd.d.ts\"/' dist/package.json

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

View workflow run for this annotation

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

Invalid workflow file

You have an error in your yaml syntax on line 27
- name: Publish to npm
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_AUTH_TOKEN }}
package: dist