Merge pull request #86 from BitteProtocol/add-prompt #214
Workflow file for this run
This file contains 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: Branch Release | |
on: | |
push | |
jobs: | |
branch_publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' # Specify the Node.js version you want to use | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: latest | |
- name: Install Dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Build | |
run: pnpm run build | |
- name: Set Version from Branch | |
run: | | |
BRANCH_NAME=${GITHUB_REF#refs/heads/} | |
SHORT_SHA=$(git rev-parse --short HEAD) | |
BASE_VERSION="0.1.0" # Define a base version | |
VERSION="${BASE_VERSION}-${BRANCH_NAME}-${SHORT_SHA}" | |
pnpm version $VERSION --no-git-tag-version | |
- name: Configure NPM Authentication | |
run: | | |
echo "@bitte-ai:registry=https://registry.npmjs.org/" > ~/.npmrc | |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> ~/.npmrc | |
- name: Publish with pnpm | |
if: ${{ github.ref_name != 'main'}} | |
run: pnpm publish --access public --tag beta --no-git-checks | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |