File tree Expand file tree Collapse file tree 1 file changed +60
-0
lines changed Expand file tree Collapse file tree 1 file changed +60
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Release
2
+
3
+ on :
4
+ workflow_dispatch : # Only run when manually triggered
5
+
6
+ jobs :
7
+ release :
8
+ runs-on : ubuntu-latest
9
+
10
+ steps :
11
+ - name : Checkout repository
12
+ uses : actions/checkout@v4
13
+
14
+ - name : Set up Node.js
15
+ uses : actions/setup-node@v5
16
+ with :
17
+ node-version : 20
18
+ package-manager-cache : false # disable built-in caching
19
+
20
+ - name : Enable Corepack
21
+ run : corepack enable
22
+
23
+ - name : Cache Yarn dependencies
24
+ uses : actions/cache@v4
25
+ with :
26
+ path : |
27
+ .yarn/cache
28
+ **/.yarn/berry/cache
29
+ key : yarn-${{ hashFiles('**/yarn.lock') }}
30
+ restore-keys : |
31
+ yarn-
32
+
33
+ - name : Install dependencies
34
+ run : yarn install --immutable
35
+
36
+ - name : Run build & tests
37
+ run : |
38
+ cd tests
39
+ yarn clean
40
+ cd ..
41
+ yarn clean
42
+ yarn clean:all
43
+ yarn build
44
+ yarn test
45
+ yarn update-samples
46
+ yarn test:samples
47
+
48
+ - name : Run release-it
49
+ env :
50
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
51
+ run : yarn release
52
+
53
+ - name : Configure npm authentication
54
+ run : |
55
+ yarn config set npmRegistryServer "https://registry.npmjs.org"
56
+ yarn config set npmAuthToken ${{ secrets.NPM_TOKEN }}
57
+
58
+ - name : Publish workspaces to npm
59
+ run : yarn workspaces foreach --all --no-private -v -p npm publish --tolerate-republish
60
+ ` ` `
You can’t perform that action at this time.
0 commit comments