Skip to content

Use 0.0.0-main-sha as version for the next tag #13

Use 0.0.0-main-sha as version for the next tag

Use 0.0.0-main-sha as version for the next tag #13

name: release-next-package
on:
push:
branches: [main]
jobs:
release-next-package:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Lint
run: npm run lint
- name: Test
run: npm test
- name: Publish to npm
run: |
version="0.0.0-main-${short_sha}"
npm version "$version" --no-git-tag-version
npm publish --access=public --tag=latest-pr
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}