Skip to content

WIP Release

WIP Release #39

Workflow file for this run

name: WIP Release
permissions:
contents: write
packages: write
on:
workflow_dispatch:
inputs:
version:
description: 'Version to publish (e.g. 0.0.8-beta.1)'
required: true
tag:
description: 'NPM distribution tag (e.g. beta, alpha, next)'
required: true
default: 'next'
branch:
description: 'Branch containing the WIP changes'
required: true
default: 'main'
jobs:
wip-release:
runs-on: ubuntu-latest
steps:
- name: Generate token
id: generate_token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.MOTIA_CI_APP_ID }}
private-key: ${{ secrets.MOTIA_CI_APP_PRIVATE_KEY }}
- uses: actions/checkout@v4
with:
token: ${{ steps.generate_token.outputs.token }}
ref: ${{ github.event.inputs.branch }}
fetch-depth: 0
- name: Setup
uses: ./.github/actions/setup
- name: Set version on all packages
run: |
pnpm -r --filter "@motiadev/*" exec pnpm version ${{ github.event.inputs.version }} --no-git-tag-version
pnpm -r --filter motia exec pnpm version ${{ github.event.inputs.version }} --no-git-tag-version
- name: Setup NPM authentication
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> .npmrc
- name: Publish packages with custom tag
run: |
pnpm publish -r --filter @motiadev/core --no-git-checks --tag ${{ github.event.inputs.tag }}
pnpm publish -r --filter @motiadev/workbench --no-git-checks --tag ${{ github.event.inputs.tag }}
pnpm publish -r --filter @motiadev/stream-client-browser --no-git-checks --tag ${{ github.event.inputs.tag }}
pnpm publish -r --filter @motiadev/stream-client-react --no-git-checks --tag ${{ github.event.inputs.tag }}
pnpm publish -r --filter motia --no-git-checks --tag ${{ github.event.inputs.tag }}
pnpm publish -r --filter @motiadev/test --no-git-checks --tag ${{ github.event.inputs.tag }}