Skip to content

Interact - Bump RC And Publish #23

Interact - Bump RC And Publish

Interact - Bump RC And Publish #23

Workflow file for this run

name: Bump RC And Publish
on:
workflow_dispatch:
secrets:
GH_EMAIL:
required: true
GH_USER:
required: true
USER_GITHUB_TOKEN:
required: true
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: Build interact package
run: yarn workspace @wix/interact build
- name: Test motion package
run: yarn workspace @wix/motion test
- name: Test interact package
run: yarn workspace @wix/interact test
# ---- BUMP VERSION ----
- name: Configure Git
run: |
git config --global user.email "${{ secrets.GH_EMAIL }}"
git config --global user.name "${{ secrets.GH_USER }}"
- name: Bump RC version
if: ${{ github.event.inputs.dry_run == 'false' }}
working-directory: packages/interact
run: yarn version prerelease --preid rc
- name: Commit and push version bump
if: ${{ github.event.inputs.dry_run == 'false' }}
run: |
git add .
git commit -m "chore: bump @wix/interact RC version [skip ci]"
git push
# ---- PUBLISH WITH TRUSTED PUBLISHING ----
- name: npm publish @wix/interact (trusted)
if: ${{ github.event.inputs.dry_run == 'false' }}
run: |
cd packages/interact
npm publish --tag rc --provenance --access=public
env:
NODE_AUTH_TOKEN: ${{ secrets.INTERACT_NPM_TOKEN }}