Repository navigation
fix: package-lock.json #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: NPM publish | |
| on: | |
| pull_request: | |
| types: [closed] | |
| branches: | |
| - 'main' | |
| push: | |
| branches: | |
| - 'main' | |
| env: | |
| success: ✅ | |
| failure: 🔴 | |
| cancelled: ❌ | |
| skipped: ⭕ | |
| node_version: 24 | |
| true: ✅ | |
| false: 🔴 | |
| jobs: | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| registry-url: https://registry.npmjs.org/ | |
| - name: Install Dependencies | |
| run: npm ci | |
| - name: Run tests | |
| run: npm test | |
| - name: Notification | |
| if: ${{ always() }} | |
| uses: appleboy/telegram-action@master | |
| with: | |
| token: ${{ secrets.BOT_TOKEN }} | |
| to: ${{ secrets.CHAT_ID }} | |
| disable_web_page_preview: true | |
| message: | | |
| Test ${{ env[job.status] }} by ${{ github.actor }} for commit in ${{ github.ref_name }} branch. | |
| Comment: ${{ github.event.commits[0].message }} | |
| Repository: ${{ github.repository }} | |
| See changes: https://github.com/${{ github.repository }}/commit/${{ github.sha }} | |
| Github action: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
| release: | |
| needs: test | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - id: release | |
| uses: halvardssm/github-action-tag-release@1.0.0 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| path: './package.json' # optional, will use ./package.json by default | |
| - run: | | |
| echo 'Release created: ${{steps.release.outputs.release_created}}' # 'true' or 'false' | |
| echo 'Release exists: ${{steps.release.outputs.release_exists}}' # 'true' or 'false' | |
| echo 'Release tag: ${{steps.release.outputs.release_tag}}' # The tag from package.json | |
| - name: Notification | |
| if: ${{ always() }} | |
| uses: appleboy/telegram-action@master | |
| with: | |
| token: ${{ secrets.BOT_TOKEN }} | |
| to: ${{ secrets.CHAT_ID }} | |
| message: | | |
| Repository: ${{ github.repository }} | |
| Release : ${{ env[steps.release.outputs.release_created] }} | |
| Tag: ${{ steps.release.outputs.release_tag }} | |
| publish-npm: | |
| needs: release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| registry-url: https://registry.npmjs.org/ | |
| - run: npm ci | |
| - run: npm run typecheck | |
| - run: npm publish | |
| env: | |
| NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | |
| - name: Notification | |
| if: ${{ always() }} | |
| uses: appleboy/telegram-action@master | |
| with: | |
| token: ${{ secrets.BOT_TOKEN }} | |
| to: ${{ secrets.CHAT_ID }} | |
| message: | | |
| Repository: ${{ github.repository }} | |
| npm publish : ${{ env[job.status] }} |