fix: append .js extension to controller imports in adminpanel config #11
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 Package to npmjs | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| # Setup Node.js | |
| - uses: actions/setup-node@v3 | |
| with: | |
| node-version: '22.x' | |
| registry-url: 'https://registry.npmjs.org' | |
| # Install dependencies and build | |
| - run: npm install --force && npm run build | |
| # Prepare dist folder | |
| - run: | | |
| cp ./package.json ./dist/ | |
| cp ./Readme.md ./dist/ | |
| echo '//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}' > ./dist/.npmrc | |
| # Resolve version: bump patch number | |
| - run: rm -rf assets/src test node_modules docs && find . -type f -name '*.ts' ! -name '*.d.ts' -delete | |
| - run: set -x; PACKAGE=$(cat package.json | jq -r '.["name"]') VERNPM=$(curl https://registry.npmjs.org/$PACKAGE | jq -r '.["dist-tags"].latest' | awk -F. -v OFS=. '{$NF += 1 ; print}') VERLOC=$(cat package.json | jq -r '.["version"]') VEROUT=$(printf "$VERNPM\n$VERLOC\n" | sort -V -r | awk 'NR==1 {print; exit}') && jq -r '.version = "'${VEROUT}'"' package.json > /tmp/package.json && mv /tmp/package.json ./package.json | |
| working-directory: ./dist | |
| # Publish to npm | |
| - run: npm publish | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| working-directory: ./dist |