Skip to content

Packages Release

Packages Release #2

name: Packages Release
on:
workflow_call:
workflow_dispatch:
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
turbo-all:
name: Compile, lint, test, & build
uses: ./.github/workflows/turbo-ci.yml
packages-release:
name: Packages Release
environment: labs-approval
runs-on: buildjet-2vcpu-ubuntu-2204
needs: turbo-all
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Access build cache
id: built
uses: buildjet/cache@v3
with:
path: .turbo
key: ${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.ref }}-${{ github.sha }}-built
restore-keys: ${{ hashFiles('**/Cargo.lock') }}-${{ hashFiles('pnpm-lock.yaml') }}-${{ github.ref }}-${{ github.sha }}-compiled
- name: Install pnpm
uses: pnpm/action-setup@v2
- name: Setup Node.js 21.x
uses: buildjet/setup-node@v4
with:
node-version: '21'
cache: 'pnpm'
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- name: Disable telemetry
run: pnpm turbo telemetry disable
- name: Build packages
run: pnpm turbo build --cache-dir=.turbo
# If there are changesets, this action will create a PR on the repo to version packages
# If there are none, it will publish newer-versioned public packages to npm
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: pnpm changeset:publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}