Skip to content

chore: fix the GitHub pages workflow (#3716) #806

chore: fix the GitHub pages workflow (#3716)

chore: fix the GitHub pages workflow (#3716) #806

name: Publish v1.x Package
on:
workflow_dispatch:
branches:
- maintenance/v1.x
push:
branches:
- maintenance/v1.x
jobs:
build-and-publish-to-npm:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Dependencies
uses: ./.github/workflows/actions/install-dependencies
- name: Setup Solana Test Validator
id: start-test-validator
uses: ./.github/workflows/actions/setup-validator
- name: Configure NPM token
run: |
pnpm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Lint, Build, and Test
uses: ./.github/workflows/actions/lint-build-and-test
- name: Publish
run: pnpm publish-packages
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Stop Test Validator
if: always() && steps.start-test-validator.outcome == 'success'
run: kill ${{ steps.start-test-validator.outputs.pid }}