-
Notifications
You must be signed in to change notification settings - Fork 3
76 lines (61 loc) · 2.22 KB
/
Copy pathprerelease.yml
File metadata and controls
76 lines (61 loc) · 2.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: 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: 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: Bump RC version
if: ${{ github.event.inputs.dry_run == 'false' }}
working-directory: packages/interact
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/interact RC version [skip ci]"
git push --follow-tags
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# ---- 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 }}