11name : Publish new release
2+
23on :
34 pull_request :
45 types : [closed]
56 branches :
6- - ' master'
7+ - " master"
78 push :
89 tags :
9- - ' v*'
10+ - " v*"
11+
12+ permissions :
13+ contents : read
14+ id-token : write
1015
1116jobs :
1217 release_gh :
13- name : Create new GitHub release
18+ name : Create new GitHub release
1419 if : contains(github.event.pull_request.labels.*.name, 'release')
1520
1621 runs-on : ubuntu-latest
1722 steps :
1823 - uses : actions/checkout@v4
1924
20- - name : Setup Node
21- uses : actions/setup-node@v4
22- with :
23- node-version : ' 20.x'
24- registry-url : ' https://registry.npmjs.org'
25+ - name : Setup
26+ uses : ./.github/actions/setup
2527
2628 - name : git config
2729 run : |
@@ -48,40 +50,13 @@ jobs:
4850 steps :
4951 - uses : actions/checkout@v4
5052
51- - name : Setup Node
52- uses : actions/setup-node@v4
53- with :
54- node-version : ' 20.x'
55- registry-url : ' https://registry.npmjs.org'
56- node-version-file : .nvmrc
57-
58- - name : Cache dependencies
59- id : yarn-cache
60- uses : actions/cache@v4
61- with :
62- path : |
63- **/node_modules
64- .yarn/install-state.gz
65- key : ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**/package.json', '!node_modules/**') }}
66- restore-keys : |
67- ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
68- ${{ runner.os }}-yarn-
69-
70- - name : Install dependencies
71- if : steps.yarn-cache.outputs.cache-hit != 'true'
72- run : yarn install --immutable
73- shell : bash
74-
75- - name : Build Expo plugin
76- run : yarn build:plugin
77- shell : bash
53+ - name : Setup
54+ uses : ./.github/actions/setup
7855
7956 - name : Configure git
8057 run : |
8158 git config user.name "${GITHUB_ACTOR}"
8259 git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
83-
84- - name : Publish package
60+
61+ - name : Publish package
8562 run : npm publish
86- env :
87- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
0 commit comments