Merge branch 'develop' of https://github.com/Bigtablet/bigtablet-fron… #7
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 to npm | ||
| on: | ||
| workflow_run: | ||
| workflows: ["Auto tag on release merge"] | ||
| types: | ||
| - completed | ||
| jobs: | ||
| publish: | ||
| if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 24 | ||
| registry-url: https://registry.npmjs.org/ | ||
| - name: Get latest tag | ||
| id: tag | ||
| run: | | ||
| TAG=$(git describe --tags --abbrev=0) | ||
| echo "tag=$TAG" >> $GITHUB_OUTPUT | ||
| - name: Set package.json version | ||
| run: | | ||
| VERSION=${{ steps.tag.outputs.tag#v }} | ||
| npm version $VERSION --no-git-tag-version | ||
| - name: Install dependencies | ||
| run: npm install | ||
| - name: Publish package | ||
| run: npm publish | ||
| env: | ||
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||