-
Notifications
You must be signed in to change notification settings - Fork 192
57 lines (51 loc) · 1.54 KB
/
publish.yml
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
name: Publish
on:
workflow_dispatch:
secrets:
GITHUB_TOKEN:
required: true
NPM_TOKEN:
required: true
jobs:
publish:
name: Publish to npm
environment: Publish
runs-on: ubuntu-latest
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
token: ${{ secrets.GH_TOKEN }}
# Workaround for corepack enable in node
# Source: (https://github.com/actions/setup-node/issues/899#issuecomment-1828798029)
- uses: actions/setup-node@v4
with:
node-version: 20
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 20
cache: yarn
# End workaround
- name: Config and Build
run: |
npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN}
yarn install --immutable
yarn build
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish (All)
if: github.event.inputs.workspace == ''
run: yarn release
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Update Apps
run: |
yarn install --no-immutable
yarn e2e install --no-immutable
yarn example install --no-immutable