Merge pull request #4 from lopatnov/minor-update #1
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 NPM package to GitHub Packages | |
| on: | |
| push: | |
| branches: [master] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Use Node.js 24.x | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version: "24.x" | |
| cache: "npm" | |
| - run: npm ci | |
| - run: npm run build | |
| - run: npm test | |
| publish-github: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: "24.x" | |
| registry-url: "https://npm.pkg.github.com" | |
| scope: "@lopatnov" | |
| - run: npm publish --access=public | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.github_token }} |