-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (66 loc) · 2.12 KB
/
Copy pathpublish.yml
File metadata and controls
79 lines (66 loc) · 2.12 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
77
78
79
name: Publish and Create Release
on:
push:
tags:
- 'v*.*.*'
permissions:
contents: write
id-token: write
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
- run: npm install -g npm@11.5.1
- run: corepack enable
- run: corepack prepare yarn@4.15.0 --activate
- uses: actions/cache@v4
with:
path: |
.yarn/cache
node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn install --immutable
- run: yarn lint
- run: yarn typecheck
- run: yarn test --run
- run: yarn build
- name: Copy LICENSE into each package
run: |
cp LICENSE packages/mejiro/
cp LICENSE packages/mejiro-react/
cp LICENSE packages/mejiro-vue/
# Publish in dependency order: core first, then framework packages.
# `yarn pack` resolves `workspace:^` deps to a concrete `^X.Y.Z` range
# in the tarball, so `npm publish <tarball>` uploads a clean manifest.
- name: Publish @libraz/mejiro
working-directory: packages/mejiro
run: |
yarn pack -o package.tgz
npm publish package.tgz --access public
- name: Wait for registry propagation
run: sleep 15
- name: Publish @libraz/mejiro-react
working-directory: packages/mejiro-react
run: |
yarn pack -o package.tgz
npm publish package.tgz --access public
- name: Publish @libraz/mejiro-vue
working-directory: packages/mejiro-vue
run: |
yarn pack -o package.tgz
npm publish package.tgz --access public
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
name: Release ${{ github.ref_name }}
tag_name: ${{ github.ref_name }}
body: |
Automated release for ${{ github.ref_name }}.
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}