fix: readme #41
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 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 |