Replace npm run with node --run #73
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: Release | |
| on: | |
| - push | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| actions: read | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| - run: node --version | |
| - run: npm i | |
| - run: node --run test | |
| - run: node --run format | |
| - name: commit auto fixes | |
| env: | |
| USERNAME: ${{ github.actor }} | |
| BRANCH: ${{ github.ref_name }} | |
| REPO: ${{ github.repository }} | |
| run: | | |
| if [ "$(git diff --quiet && echo 0 || echo $?)" -gt 0 ]; then | |
| git commit -am "😎 Autofix" | |
| git push origin $BRANCH | |
| exit 1 | |
| fi | |
| - name: Build and Publish | |
| if: github.ref == 'refs/heads/main' | |
| env: | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| run: | | |
| echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc | |
| npx @lets/publish |