Skip to content

Motion - Bump RC And Publish #3

Motion - Bump RC And Publish

Motion - Bump RC And Publish #3

name: Motion - Bump RC And Publish
on:
workflow_dispatch:
inputs:
dry_run:
description: 'Dry run (preview only)'
required: false
default: false
type: boolean
permissions:
id-token: write # REQUIRED for npm Trusted Publishing
contents: write
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
fetch-depth: 0 # full history for yarn version
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Node with trusted publishing
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 24
registry-url: https://registry.npmjs.org
- run: corepack enable
- run: corepack prepare yarn@4.10.3 --activate
- run: yarn set version 4.10.3
- run: NPQ_PKG_MGR=yarn npx npq install
- name: Build motion package
run: yarn workspace @wix/motion build
- name: Test motion package
run: yarn workspace @wix/motion test
# ---- BUMP VERSION ----
- name: Bump RC version
if: ${{ github.event.inputs.dry_run == 'false' }}
working-directory: packages/motion
run: yarn version prerelease
- name: Commit and push version bump
if: ${{ github.event.inputs.dry_run == 'false' }}
run: |
git config user.email "github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
git add .
git commit -m "chore: bump @wix/motion RC version [skip ci]"
git push --follow-tags
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# ---- PUBLISH WITH TRUSTED PUBLISHING ----
- name: npm publish @wix/motion (trusted)
if: ${{ github.event.inputs.dry_run == 'false' }}
run: |
cd packages/motion
npm publish --tag next --provenance --access=public
env:
NODE_AUTH_TOKEN: ${{ secrets.INTERACT_NPM_TOKEN }}