Skip to content

Merge branch 'main' into alpha #34

Merge branch 'main' into alpha

Merge branch 'main' into alpha #34

Workflow file for this run

name: Publish CLI Prerelease
on:
push:
branches:
- alpha
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{secrets.PAT}}
- name: Enable Corepack before setting up Node
run: corepack enable
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20.x"
- name: Authenticate to npm
run: |
echo "registry=https://registry.npmjs.org/" >> .npmrc
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc
npm whoami
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Install dependencies
run: yarn install --immutable
- name: Build
run: yarn build
- name: Run tests
run: yarn test
- name: Version and Publish
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
# Configure both npm and GitHub Package registries
echo "registry=https://registry.npmjs.org/" > .npmrc
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc
echo "@niledatabase:registry=https://npm.pkg.github.com" >> .npmrc
echo "//npm.pkg.github.com/:_authToken=$GITHUB_TOKEN" >> .npmrc
# Run semantic-release with prerelease configuration
npx semantic-release