feat: add function to trim outer blank lines from text #11
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: Release | |
| on: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: write | |
| issues: write | |
| pull-requests: write | |
| packages: write | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10.33.0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: pnpm | |
| registry-url: https://npm.pkg.github.com | |
| scope: '@obcode' | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Verify package publish token | |
| run: | | |
| if [ -z "${{ secrets.GH_PACKAGES_TOKEN }}" ]; then | |
| echo "Missing GH_PACKAGES_TOKEN secret (PAT with write:packages)." | |
| exit 1 | |
| fi | |
| - name: Release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NPM_TOKEN: ${{ secrets.GH_PACKAGES_TOKEN }} | |
| NODE_AUTH_TOKEN: ${{ secrets.GH_PACKAGES_TOKEN }} | |
| run: pnpm run release |