1.7.0 #10
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 Branch | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| release_candidate: | |
| runs-on: ubuntu-latest | |
| env: | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| BRANCH_NAME: dev | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '24.x' | |
| registry-url: 'https://registry.npmjs.org' | |
| cache: 'npm' | |
| - run: npm ci | |
| - run: npm run build | |
| - name: Get current package.json version | |
| run: echo "PACKAGE_VERSION=$(npm pkg get version | tr -d '"')" >> $GITHUB_ENV | |
| # get the sort SHA and add it into the environment variables | |
| - name: Setup Branch Release Candidate Version | |
| run: echo "BRANCH_VERSION=$PACKAGE_VERSION-$BRANCH_NAME.${GITHUB_SHA::7}" >> $GITHUB_ENV | |
| - name: Bump version | |
| run: npm run version:branch | |
| env: | |
| VERSION: ${{ env.BRANCH_VERSION }} | |
| - name: Publish a new branch release candidate version | |
| run: npm run release:branch | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| PUBLISH_TAG: ${{ env.BRANCH_NAME }} |