Skip to content

chore: bump zx from 8.2.4 to 8.3.2 (#143) #83

chore: bump zx from 8.2.4 to 8.3.2 (#143)

chore: bump zx from 8.2.4 to 8.3.2 (#143) #83

name: Publish Packages
on:
workflow_dispatch:
branches:
- main
push:
branches:
- main
env:
# Among other things, opts out of Turborepo telemetry
# See https://consoledonottrack.com/
DO_NOT_TRACK: '1'
# Enables Turborepo Remote Caching.
TURBO_REMOTE_CACHE_SIGNATURE_KEY: ${{ secrets.TURBO_REMOTE_CACHE_SIGNATURE_KEY }}
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
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: Build And Test (bypass cache)
run: pnpm build --force
- name: Create Changesets Pull Request or Publish to NPM
id: changesets
uses: changesets/action@v1
with:
# Some tasks slow down considerably on GitHub Actions runners when concurrency is high
publish: pnpm turbo publish-packages --concurrency=1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
PUBLISH_TAG: latest
- name: Push Git Tag
if: steps.changesets.outputs.published == 'true'
run: |
VERSION_TAG=v$(cd packages/kit/ && pnpm pkg get version | grep -o '"\([^"]\)\+"$' | tr -d \")
if ! git ls-remote --tags | grep -q "$VERSION_TAG"; then git tag $VERSION_TAG && git push --tags; fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Stop Test Validator
if: always() && steps.start-test-validator.outcome == 'success'
run: kill ${{ steps.start-test-validator.outputs.pid }}