From 477b394c5cca94f89a320d78befe14004004fb64 Mon Sep 17 00:00:00 2001 From: Andy Wang <41224501+andy-t-wang@users.noreply.github.com> Date: Wed, 31 Jul 2024 15:40:08 -0700 Subject: [PATCH] ci: Add github packages (#270) --- .github/workflows/release.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3ceb523..8ed6df9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,6 +17,7 @@ jobs: uses: google-github-actions/release-please-action@v3 with: command: manifest + release-type: node publish: needs: release @@ -47,3 +48,33 @@ jobs: run: pnpm publish -r --report-summary env: NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} + + publish-github: + needs: release + name: Publish + runs-on: ubuntu-latest + if: ${{ needs.release.outputs.releases_created }} + steps: + - uses: actions/checkout@v3 + + - uses: pnpm/action-setup@v4 + with: + version: 8 + + - name: Set up Node + uses: actions/setup-node@v3 + with: + node-version: 18 + cache: 'pnpm' + registry-url: 'https://npm.pkg.github.com' + + - name: Install dependencies + run: pnpm install + + - name: Build + run: pnpm build + + - name: Publish + run: pnpm publish -r --report-summary + env: + NODE_AUTH_TOKEN: ${{secrets.GIT_HUB_TOKEN}} \ No newline at end of file