Skip to content

chore: directory change #19

chore: directory change

chore: directory change #19

name: Publish Beta Package
on:
push:
branches:
- "**"
workflow_dispatch:
permissions:
id-token: write
contents: read
jobs:
publish-beta:
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "21.x"
registry-url: "https://registry.npmjs.org"
- name: Install dependencies
run: npx pnpm install
- name: Set version for beta release
run: |
VERSION=$(node -p "require('./package.json').version")
TIMESTAMP=$(date +%s)
BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)
BETA_VERSION="${VERSION}--develop-${BRANCH_NAME}.${TIMESTAMP}"
npm version $BETA_VERSION --no-git-tag-version
shell: bash
- name: Build the package
run: npx pnpm run build
- name: Publish to npm registry (beta)
run: npx pnpm publish --provenance --access public --tag develop --no-git-checks
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}