fix(server): match on path correctly #276
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: Publish @niledatabase packages to GitHub Packages | |
on: | |
pull_request: | |
types: | |
- closed | |
branches: | |
- main | |
jobs: | |
if_merged: | |
if: github.event.pull_request.merged | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
packages: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
ref: main | |
token: ${{secrets.PAT}} | |
- name: Enable Corepack before setting up Node | |
run: corepack enable | |
# Setup .npmrc file to publish to GitHub Packages | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20.x" | |
# registry-url: 'https://npm.pkg.github.com' | |
# Defaults to the user or organization that owns the workflow file | |
# scope: '@niledatabase' | |
- name: Authenticate to npm | |
run: | | |
echo "@niledatabase:wq:registry=https://registry.npmjs.org/" | |
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 @niledatabase/server | |
working-directory: packages/server | |
run: yarn install --immutable | |
- name: Install @niledatabase/browser | |
working-directory: packages/browser | |
run: yarn install --immutable | |
- name: Install @niledatabase/react | |
working-directory: packages/react | |
run: yarn install --immutable | |
- name: Build @niledatabase/packages | |
run: yarn build | |
- name: Version | |
run: | | |
git config user.name "${{ github.actor }}" | |
git config user.email "${{ github.actor }}@users.noreply.github.com" | |
npx lerna version --force-publish --conventional-prerelease --conventional-commits --yes | |
- name: Publish to npm | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: | | |
npx lerna publish from-git --yes | |
- name: Update npm for git | |
run: | | |
rm -rf .npmrc | |
echo "@niledatabase:registry=https://npm.pkg.github.com/" >> .npmrc | |
echo "//npm.pkg.github.com/:_authToken=$NPM_TOKEN" >> .npmrc | |
env: | |
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish to git | |
run: npx lerna publish from-git --yes --registry=https://npm.pkg.github.com/ |