Skip to content

fix: improve log report formatting for better readability #57

fix: improve log report formatting for better readability

fix: improve log report formatting for better readability #57

Workflow file for this run

name: deploy
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
name: build and deploy
strategy:
matrix:
platform: [darwin, linux]
arch: [x64, arm64]
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- uses: pnpm/action-setup@v2
with:
version: 8
- run: bun install
- run: bun build . --target="bun-${{ matrix.platform }}-${{ matrix.arch }}" --outfile="bin/${{ matrix.platform }}-${{ matrix.arch }}" --compile
# upload the build artifact
- uses: actions/upload-artifact@v4
with:
path: bin
name: ${{ matrix.platform }}-${{ matrix.arch }}
deploy:
runs-on: ubuntu-latest
name: deploy
needs: build
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/cache/restore@v4
with:
path: |
**/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/bun.lockb') }}
- uses: actions/download-artifact@v4
with:
path: bin
- run: pnpm version prepatch --preid="pr-$GITHUB_RUN_ID" --no-git-tag-version
if: github.event_name == 'pull_request'
- name: authenticate with npm
run: echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" > ~/.npmrc
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: publish prerelease
run: pnpm publish --access public --no-git-checks --tag="pr-${{ github.event.number }}"
if: github.event_name == 'pull_request'
- name: publish
run: pnpm publish --access public --no-git-checks
if: github.event_name == 'push' && github.ref == 'refs/heads/main'