chore(version): bump to 2.4.0 #17
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: | |
| branches: | |
| - main | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| registry-url: https://registry.npmjs.org/ | |
| - run: npm ci | |
| - run: npm audit signatures | |
| - run: npm run build | |
| - name: Get the current version from package.json | |
| id: get_version | |
| run: echo ::set-output name=version::$(node -p "require('./package.json').version") | |
| - name: Create Git tag | |
| run: git tag ${{ steps.get_version.outputs.version }} | |
| - name: Push Git tag | |
| run: git push origin ${{ steps.get_version.outputs.version }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: "marvinpinto/action-automatic-releases@latest" | |
| with: | |
| repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
| automatic_release_tag: ${{ steps.get_version.outputs.version }} | |
| prerelease: false | |
| - name: Publish to NPM | |
| run: npm publish | |
| env: | |
| NODE_AUTH_TOKEN: ${{secrets.npm_token}} |