Skip to content

Publish packages

Publish packages #4

Workflow file for this run

name: Publish packages
on:
workflow_dispatch:
schedule:
- cron: "0 7 * * *"
push:
branches:
- main
paths:
- packages/core/package.json
jobs:
publish:
runs-on: ubuntu-latest
outputs:
nightly: ${{steps.nightly.outputs.nightly }}
permissions:
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Enable Corepack
run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: "https://registry.npmjs.org"
cache: "yarn"
- name: Install dependencies
run: yarn install
- name: Check nightly status
id: nightly
run: echo "nightly=${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}" >> "$GITHUB_OUTPUT"
- name: Publish changed packages
run: node .github/scripts/publish.mjs ${{ steps.nightly.outputs.nightly }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}