File tree Expand file tree Collapse file tree 2 files changed +12
-11
lines changed Expand file tree Collapse file tree 2 files changed +12
-11
lines changed Original file line number Diff line number Diff line change 11name : Release
22
33on :
4- push :
5- branches :
6- - main
4+ release :
5+ types : [published]
76
87jobs :
98 release :
109 name : Release
10+ if : github.repository == 'reach/reach-ui'
1111 runs-on : ubuntu-latest
12+
13+ strategy :
14+ matrix :
15+ node-version : [14.x]
16+
1217 env :
1318 NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
1419
15- if : ${{ startsWith(github.ref, 'refs/tags/v') && github.repository == 'reach/reach-ui' }}
16-
1720 steps :
1821 - name : Checkout
1922 uses : actions/checkout@v2
2023
21- - name : Use Node 14
24+ - name : Use Node.js ${{ matrix.node-version }}
2225 uses : actions/setup-node@v1
2326 with :
24- version : 14.x
27+ node- version : ${{ matrix.node-version }}
2528
2629 - name : Restore Lerna (Cache)
2730 uses : actions/cache@v2
3134 */*/node_modules
3235 key : ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
3336
34- - run : echo "RELEASE_TAG=$(echo ${GITHUB_REF##*/})" >> $GITHUB_ENV
35-
3637 - name : Install Dependencies
3738 run : yarn --frozen-lockfile
3839
4243 - name : Test
4344 run : yarn test
4445
45- - run : echo "Publishing $RELEASE_TAG to npm ..."
46+ - run : echo "Publishing to npm..."
4647 - run : echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > "$HOME/.npmrc"
4748
4849 - name : Publish Packages
Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ $ git log -p
139139# If everything looks good, push to GitHub along with the new tag:
140140$ git push origin main --follow-tags
141141
142- # Open up github.com/reach/reach-ui/actions and watch the build. There will
142+ # Open up https:// github.com/reach/reach-ui/actions and watch the build. There will
143143# be 2 builds, one for the push to the main branch and one for the
144144# new tag. The tag build will run the build and all the tests and then
145145# automatically publish to npm if everything passes. If there's a
You can’t perform that action at this time.
0 commit comments