feat: add @pnstack/utils package with utility functions and documenta… #5
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: CI | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
env: | |
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
TURBO_TEAM: ${{ vars.TURBO_TEAM }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 9 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "18" | |
cache: "pnpm" | |
registry-url: "https://npm.pkg.github.com" | |
scope: "@pnstack" | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Build | |
run: pnpm build | |
publish: | |
needs: build | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 9 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "18" | |
cache: "pnpm" | |
registry-url: "https://npm.pkg.github.com" | |
scope: "@pnstack" | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Build | |
run: pnpm build | |
- name: Configure Git | |
run: | | |
git config --global user.name "GitHub Actions Bot" | |
git config --global user.email "actions@github.com" | |
- name: Publish to GitHub Packages | |
run: pnpm -r publish --no-git-checks --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_CONFIG_REGISTRY: "https://npm.pkg.github.com/pnstack" | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |